-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Force Plot Size + Tkinter Integration #33
Comments
Hi @gregwa1953 , Thanks for the idea and I will definitively work on that. I was thinking of a function as I will keep updated. All the best P.S. The idea of having a tkinter text widget sounds great. If you want to share it perhaps drop a code and an image. thanks |
I really appreciate it. Thank you again for the help and the great project. |
I've updated a demo that I created using PAGE, a GUI designer for Python using Tkinter. I've included all three files generated by PAGE (The actual tcl file from the designer and the two Python files that age generated by PAGE.) plus this readme and a screen capture of the actual program in operation. It is a very basic demo program, simply designed to show how easy it is to place a plotext saved plot figure file into a scrolled Tkinter Text box. The file plotextTest2.py is the actual GUI file that is created by PAGE and should not be modified by hand. The plotextTest2_support.py file is where all the code goes. PAGE creates this file as well and includes all start up code and all callbacks that are needed to get started. I have commented the "_support.py" file fairly well. The attached zip file contains a readme.md file, the screen image above and the source files. Please see the readme.md file within the zip for more information. It actually took me more time to generate the covid-19 data list than it did to create the GUI and write the rest of the code. 90% of all the work was done by PAGE. The program uses a ScrolledText widget, that comes with PAGE, but could easily be replaced with a "standard" Tk/Tkinter Text widget. I chose to use the ScrolledText widget to ensure that regardless of the terminal size, the plot would show on the form. Thank you again!, Greg Walters |
Hi @gregwa1953 , the new 4.0.0 version of I have credited you for the idea regarding forcing the plot size beyond the terminal: in this version the function that does it is actually Regarding the Thanks and all the best, |
Hi @gregwa1953, not sure if you are still interested but i have created a page guide for the integration of The new Thanks and all the best, |
Thank you! I'll grab the guide and the new cuts!
Greg
…On Sat, Dec 18, 2021 at 7:45 AM piccolomo ***@***.***> wrote:
Hi @gregwa1953 <https://github.com/gregwa1953>,
not sure if you are still interested but i have created a page guide for
the integration of plotext and tkinter available here
<https://github.com/piccolomo/plotext/blob/master/readme/environments.md#tkinter>
.
The new version 4.1.3 is available on github
<https://github.com/piccolomo/plotext> and pypi
<https://pypi.org/project/plotext/>.
Thanks and all the best,
Savino
—
Reply to this email directly, view it on GitHub
<#33 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEKEQMMNGOCRXHTVWRVUNBDURSGBFANCNFSM5BESVQMQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
*To be forewarned is to be forearmed. To be forearmed means you can't buy
off the rack.*
Greg Walters
|
great: it is an attempt, so any idea to improve it is welcomed.
|
Hi @gregwa1953, thanks for the update and glad you enjoyed the initial result. Just reminding that in your previous code, you were able to print in colors and with high resolution markers. Not sure how you managed that, as I didn't seem to find a way. It would be cool to see those features in your next demo, if they are easy to integrate and you are available. One thing this integration could be useful at, for example, is to plot really big images or plots, which is not possible on terminal due to its more limited size. A button to save the image and plot as html, could also be an idea . Thanks a lot for your interest and take care! P.s. I could find the |
Actually, the code was only able to show the plot in monochrome, but the plot itself was saved as a colour plot. I am, however, trying to figure out a way to provide colour support. At this point, my demo program, like yours, uses a tk.Label widget to show the plot, which can not provide colour support. All that having been said, I've taken my demo program from the new version of PAGE (which hasn't been released yet) to the current version (6.2). The attached zip file contains the two Python files and the .tcl file for PAGE itself. Here are a few screenshots... I truly hope that this demo helps to support your fantastic package! I'll notify you if I can crack the colour thing. Greg |
Hi @gregwa1953, I did it! Thanks to your valuable inputs and encouragements, I arrived to a satisfactory results, shown here. What do you think? :-) Thanks, |
AWESOME JOB!
Thank you so much!
I will spend the Christmas "vacation" digesting the latest and attempt a
new version of the demo.
Greg
…On Thu, Dec 23, 2021 at 2:51 AM piccolomo ***@***.***> wrote:
Hi @gregwa1953 <https://github.com/gregwa1953>,
I did it! Thanks to your valuable inputs and encouragements, I arrived to
a satisfactory results, shown here
<https://github.com/piccolomo/plotext/blob/master/readme/environments.md#tkinter>
.
What do you think? :-)
Thanks,
Savino
—
Reply to this email directly, view it on GitHub
<#33 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEKEQMNQXBN45OHASKKNPWLUSLPIPANCNFSM5BESVQMQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
*To be forewarned is to be forearmed. To be forearmed means you can't buy
off the rack.*
Greg Walters
|
First, I love the program!
I have been able to use plotext to plot to a tkinter text widget. It works well, but is totally dependent on the terminal size that the user happens to be using at runtime.
Would it be possible to add a flag to ignore the actual terminal size and force it to, let's say 80x24, so that when the plot is generated (hidden and saved to file) can be sent directly to the tkinter text widget?
Thank you in advance for your consideration.
Greg
The text was updated successfully, but these errors were encountered: