From vincent.douce.mathoscope at netcourrier.com Thu Dec 3 12:14:11 2020 From: vincent.douce.mathoscope at netcourrier.com (Vincent Douce Mathoscope) Date: Thu, 3 Dec 2020 18:14:11 +0100 Subject: [Matplotlib-users] tk and matplotlib In-Reply-To: References: Message-ID: Hi Anthony hi everyone i feel blocked at the just beginning of my attempts with PySimpleGUI/MatPlotLib with exactly your code i get this answer : i dont know in which direction to search : Vincent ------- 2020-12-03 16:20:55.678 Python[17698:7853902] -[NSApplication _setup:]: unrecognized selector sent to instance 0x7ff7e7890560 2020-12-03 16:20:55.686 Python[17698:7853902] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSApplication _setup:]: unrecognized selector sent to instance 0x7ff7e7890560' *** First throw call stack: ( 0 CoreFoundation 0x00007fff2eafda7d __exceptionPreprocess + 256 1 libobjc.A.dylib 0x00007fff591cea17 objc_exception_throw + 48 2 CoreFoundation 0x00007fff2eb77886 -[NSObject(NSObject) __retain_OA] + 0 3 CoreFoundation 0x00007fff2ea9f8ef ___forwarding___ + 1485 4 CoreFoundation 0x00007fff2ea9f298 _CF_forwarding_prep_0 + 120 5 libtk8.6.dylib 0x0000000102bf41f2 TkpInit + 408 6 libtk8.6.dylib 0x0000000102b63aac Initialize + 2454 7 _tkinter.cpython-39-darwin.so 0x00000001029b7704 Tcl_AppInit + 84 8 _tkinter.cpython-39-darwin.so 0x00000001029b7022 _tkinter_create + 1362 9 Python 0x00000001020d672a cfunction_vectorcall_FASTCALL + 218 10 Python 0x000000010216e86c call_function + 732 11 Python 0x000000010216bd93 _PyEval_EvalFrameDefault + 25219 12 Python 0x000000010216f563 _PyEval_EvalCode + 2611 13 Python 0x00000001020989b1 _PyFunction_Vectorcall + 289 14 Python 0x00000001020980b5 _PyObject_FastCallDictTstate + 293 15 Python 0x0000000102098c98 _PyObject_Call_Prepend + 152 16 Python 0x00000001020f21e5 slot_tp_init + 165 17 Python 0x00000001020ed699 type_call + 345 18 Python 0x000000010209825d _PyObject_MakeTpCall + 365 19 Python 0x000000010216e8fc call_function + 876 20 Python 0x000000010216be2b _PyEval_EvalFrameDefault + 25371 21 Python 0x0000000102098a28 function_code_fastcall + 104 22 Python 0x000000010216e86c call_function + 732 23 Python 0x000000010216bd93 _PyEval_EvalFrameDefault + 25219 24 Python 0x000000010216f563 _PyEval_EvalCode + 2611 25 Python 0x00000001020989b1 _PyFunction_Vectorcall + 289 26 Python 0x000000010216e86c call_function + 732 27 Python 0x000000010216bd93 _PyEval_EvalFrameDefault + 25219 28 Python 0x000000010216f563 _PyEval_EvalCode + 2611 29 Python 0x00000001020989b1 _PyFunction_Vectorcall + 289 30 Python 0x00000001020980b5 _PyObject_FastCallDictTstate + 293 31 Python 0x0000000102098c98 _PyObject_Call_Prepend + 152 32 Python 0x00000001020f21e5 slot_tp_init + 165 33 Python 0x00000001020ed699 type_call + 345 34 Python 0x000000010209825d _PyObject_MakeTpCall + 365 35 Python 0x000000010216e8fc call_function + 876 36 Python 0x000000010216bd93 _PyEval_EvalFrameDefault + 25219 37 Python 0x0000000102098a28 function_code_fastcall + 104 38 Python 0x000000010216e86c call_function + 732 39 Python 0x000000010216be2b _PyEval_EvalFrameDefault + 25371 40 Python 0x000000010216f563 _PyEval_EvalCode + 2611 41 Python 0x00000001020989b1 _PyFunction_Vectorcall + 289 42 Python 0x000000010216e86c call_function + 732 43 Python 0x000000010216bd72 _PyEval_EvalFrameDefault + 25186 44 Python 0x000000010216f563 _PyEval_EvalCode + 2611 45 Python 0x00000001020989b1 _PyFunction_Vectorcall + 289 46 Python 0x000000010209aa6a method_vectorcall + 202 47 Python 0x000000010216e86c call_function + 732 48 Python 0x000000010216bec1 _PyEval_EvalFrameDefault + 25521 49 Python 0x000000010216f563 _PyEval_EvalCode + 2611 50 Python 0x00000001020989b1 _PyFunction_Vectorcall + 289 51 Python 0x000000010209aa6a method_vectorcall + 202 52 Python 0x000000010216e86c call_function + 732 53 Python 0x000000010216bec1 _PyEval_EvalFrameDefault + 25521 54 Python 0x0000000102098a28 function_code_fastcall + 104 55 Python 0x000000010216e86c call_function + 732 56 Python 0x000000010216bd72 _PyEval_EvalFrameDefault + 25186 57 Python 0x000000010216f563 _PyEval_EvalCode + 2611 58 Python 0x00000001020989b1 _PyFunction_Vectorcall + 289 59 Python 0x000000010209802f _PyObject_FastCallDictTstate + 159 60 Python 0x0000000102098c98 _PyObject_Call_Prepend + 152 61 Python 0x00000001020f21e5 slot_tp_init + 165 62 Python 0x00000001020ed699 type_call + 345 63 Python 0x000000010209825d _PyObject_MakeTpCall + 365 64 Python 0x000000010216e8fc call_function + 876 65 Python 0x000000010216bec1 _PyEval_EvalFrameDefault + 25521 66 Python 0x000000010216f563 _PyEval_EvalCode + 2611 67 Python 0x00000001021659eb PyEval_EvalCode + 139 68 Python 0x00000001021b8352 PyRun_FileExFlags + 434 69 Python 0x00000001021b792f PyRun_SimpleFileExFlags + 831 70 Python 0x00000001021d47e9 Py_RunMain + 1801 71 Python 0x00000001021d4c7f pymain_main + 223 72 Python 0x00000001021d4e7b Py_BytesMain + 43 73 libdyld.dylib 0x00007fff5a99c3d5 start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException Abort trap: 6 > Le 30 nov. 2020 ? 15:31, Anthony Billings a ?crit : > > When I want to embed an MPL plot inside of a tkinter window I use PySimpleGUI. It?s a quick and easy module that makes working with tkinter much more manageable. I?ve found an example that uses PySimpleGui and embeds a simple MPL plot inside. I hope this helps. Happy coding! > > #!/usr/bin/env python > import PySimpleGUI as sg > import matplotlib > from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg > # matplotlib.use('TkAgg') > import numpy as np > import matplotlib.pyplot as plt > """ > Demonstrates one way of embedding Matplotlib figures into a PySimpleGUI window. > Paste your Pyplot code into the section marked below. > Do all of your plotting as you normally would, but do NOT call plt.show(). > Stop just short of calling plt.show() and let the GUI do the rest. > The remainder of the program will convert your plot and display it in the GUI. > If you want to change the GUI, make changes to the GUI portion marked below. > """ > > import matplotlib.pyplot as plt > import numpy as np > > def abline(slope, intercept): > """Plot a line from slope and intercept""" > axes = plt.gca() > x_vals = np.array(axes.get_xlim()) > y_vals = intercept + slope * x_vals > plt.plot(x_vals, y_vals, '--') > > # ------------------------------- PASTE YOUR MATPLOTLIB CODE HERE ------------------------------- > > abline(-0.3, 1) > plt.ylim(0.5, 1.5) > plt.xlim(0,1) > > > # ------------------------------- END OF YOUR MATPLOTLIB CODE ------------------------------- > > # ------------------------------- Beginning of Matplotlib helper code ----------------------- > > def draw_figure(canvas, figure, loc=(0, 0)): > figure_canvas_agg = FigureCanvasTkAgg(figure, canvas) > figure_canvas_agg.draw() > figure_canvas_agg.get_tk_widget().pack(side='top', fill='both', expand=1) > return figure_canvas_agg > > # ------------------------------- Beginning of GUI CODE ------------------------------- > > > fig = plt.gcf() # if using Pyplot then get the figure from the plot > figure_x, figure_y, figure_w, figure_h = fig.bbox.bounds > > # define the window layout > layout = [[sg.Text('Plot test', font='Any 18')], > [sg.Canvas(size=(figure_w, figure_h), key='-CANVAS-')], > [sg.OK(pad=((figure_w / 2, 0), 3), size=(4, 2))]] > > # create the form and show it without the plot > window = sg.Window('Demo Application - Embedding Matplotlib In PySimpleGUI', > layout, force_toplevel=True, finalize=True) > > # add the plot to the window > fig_photo = draw_figure(window['-CANVAS-'].TKCanvas, fig) > > # show it all again and get buttons > event, values = window.read() > > window.close() > > > From: Matplotlib-users On Behalf Of Vincent Douce Mathoscope > Sent: Monday, November 30, 2020 5:53 AM > To: matplotlib-users at python.org > Subject: [Matplotlib-users] tk and matplotlib > > hi > i am creating a matplotlib draw (musical sales on a guitar) in function of some parameters (tonic note, type of gamme or chord...) > i am now creating tk radio buttons so that the user can choose the parameters > i can get these parameters and create the matplotlib picture with them > but the matplotlib will open a different window > would it be possible to have a same window, divided as a table, with at the lift the radio buttons, and at the right the matplotlib result ? > ---- > https://lemathoscope.com/ > cours de maths postbac par visio ---- https://lemathoscope.com/ cours de maths postbac par visio -------------- next part -------------- An HTML attachment was scrubbed... URL: From goswami.laxman at gmail.com Sat Dec 5 00:19:09 2020 From: goswami.laxman at gmail.com (Laxman Goswami) Date: Sat, 5 Dec 2020 10:49:09 +0530 Subject: [Matplotlib-users] Hold off in Python Plots using matplotlib.pyplot Message-ID: Hello sir/mam How can I hold off a plot command in python? *Thanks and Regards* *Laxman Prasad Goswami* [image: Mailtrack] Sender notified by Mailtrack 05/12/20, 10:48:54 -------------- next part -------------- An HTML attachment was scrubbed... URL: From symphoni.bush at noaa.gov Wed Dec 16 11:01:48 2020 From: symphoni.bush at noaa.gov (Symphoni Bush - NOAA Affiliate) Date: Wed, 16 Dec 2020 11:01:48 -0500 Subject: [Matplotlib-users] Matplotlib 2 LTS EOL Versions? Message-ID: Good morning, I am trying to figure out what versions of Matplotlib 2 LTS are end-of-life and if so, what dates these versions became EOL. If there is somewhere this information is stored, please let me know. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From tcaswell at gmail.com Wed Dec 16 15:08:53 2020 From: tcaswell at gmail.com (Thomas Caswell) Date: Wed, 16 Dec 2020 15:08:53 -0500 Subject: [Matplotlib-users] Matplotlib 2 LTS EOL Versions? In-Reply-To: References: Message-ID: We do not plan to make any further 2.2.x releases as support ended with upstream support for Python 2.7 in Jan 2020. The final release in the 2.2 LTS series was 2.2.5 (https://github.com/matplotlib/matplotlib/releases/tag/v2.2.5) in February 2020. This is the policy that we announced with the release of 2.2.0 https://discourse.matplotlib.org/t/ann-matplotlib-2-2-0-released/20227 . We typically only commit to providing patch releases to the most recently released minor version (currently 3.3.x, soon to be 3.4.x). In the extraordinary circumstances we would consider issuing patch releases for older versions. I do not see us doing another LTS (as that was driven by wanting to support users on py27 for as long as py27 was supported). Responding to this I noticed we have not dropped 2.2.x from our list of active branches (which I am working on doing now!). This should be documented at https://matplotlib.org/devel/coding_guide.html#current-branches . Tom On Wed, Dec 16, 2020 at 11:02 AM Symphoni Bush - NOAA Affiliate via Matplotlib-users wrote: > Good morning, > > I am trying to figure out what versions of Matplotlib 2 LTS are > end-of-life and if so, what dates these versions became EOL. If there is > somewhere this information is stored, please let me know. > > Thanks > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > -- Thomas Caswell tcaswell at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincent.douce.mathoscope at netcourrier.com Tue Dec 29 06:35:43 2020 From: vincent.douce.mathoscope at netcourrier.com (Vincent Douce Mathoscope) Date: Tue, 29 Dec 2020 12:35:43 +0100 Subject: [Matplotlib-users] IDE Message-ID: <430CFD59-8836-45A6-B56E-727D433C51D1@netcourrier.com> hi which IDE do you use ? i use vim and a `python3 mypro.py`instruction but i am wondering if it exists something more ergonomic to work spcifically with matplotlib, i mean i modify the code, i press a shortcut on the keyboard and the matplotlib window would be actualized Vincent -------------- next part -------------- An HTML attachment was scrubbed... URL: From ashish.panigrahi at niser.ac.in Tue Dec 29 08:04:52 2020 From: ashish.panigrahi at niser.ac.in (Ashish Panigrahi) Date: Tue, 29 Dec 2020 18:34:52 +0530 Subject: [Matplotlib-users] IDE In-Reply-To: <430CFD59-8836-45A6-B56E-727D433C51D1@netcourrier.com> References: <430CFD59-8836-45A6-B56E-727D433C51D1@netcourrier.com> Message-ID: Hi Vincent! I use vim as well. I'd suggest checking out vim-ipython-cell ( https://github.com/hanschen/vim-ipython-cell) which integrates ipython and vim in a tmux session. If you wish, there's also jupyter-vim ( https://github.com/jupyter-vim/jupyter-vim) which uses Jupyter console instead (has inline plots just like notebooks). The former is the workflow that I personally use and I'm quite happy with it. :-) Best wishes, Ashish -- Ashish Panigrahi, 3rd year, Integrated MSc. School of Physical Sciences National Institute of Science Education and Research Bhubaneswar On Tue, 29 Dec 2020, 18:28 Vincent Douce Mathoscope, < vincent.douce.mathoscope at netcourrier.com> wrote: > hi > which IDE do you use ? > i use vim and a `python3 mypro.py`instruction but i am wondering if it > exists something more ergonomic to work spcifically with matplotlib, i mean > i modify the code, i press a shortcut on the keyboard and the matplotlib > window would be actualized > Vincent > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincent.douce.mathoscope at netcourrier.com Thu Dec 31 05:14:22 2020 From: vincent.douce.mathoscope at netcourrier.com (Vincent Douce Mathoscope) Date: Thu, 31 Dec 2020 11:14:22 +0100 Subject: [Matplotlib-users] program about guitar Message-ID: hi as i put this page on my new website, i just wanted to share it with you : the first link on the page is the result and the second link is the source code https://lemathoscope.com/mathematiques-pour-la-guitare/ Vincent ---- https://lemathoscope.com/ cours de maths postbac par visio -------------- next part -------------- An HTML attachment was scrubbed... URL: