From: Elfnor <el...@gm...> - 2008-12-03 22:05:15
|
Hi I'm giving an introductory talk on matplotlib to colleagues next week. I'd like to run matplotlib in interactive mode from the PythonWin IDE. Is this possible? I use PyScripter or occasionally IPython myself, but the python group I'm talking to have all been set up with PythonWin and my brief is to avoid confusing then with another IDE. thanks Eleanor -- View this message in context: http://www.nabble.com/Can-matplotlib-be-run-from-PythonWin-IDE-in-interactive-mode--tp20822638p20822638.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Christopher B. <Chr...@no...> - 2008-12-03 23:05:01
|
Elfnor wrote: > I'm giving an introductory talk on matplotlib to colleagues next week. I'd > like to run matplotlib in interactive mode from the PythonWin IDE. Is this > possible? probably not reliably -- pythonWin IDE runs things inside the same interpreter as the IDE itself, and therefore has problems running GUI code with any GUI that MPL supports. IPython has smarts to start up MPL in another thread to avoid the issues. Has pythonWin IDE seen any maintenance in the last five years? It may be time for them to move on! On the other hand, you can still edit code with the IDE, and start it from a command line. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
From: Thomas P. <ya...@gm...> - 2008-12-06 12:14:04
|
Hi, does that mean that it works for you with PyScripter? Right now the only way to do more than one plot with MPL with PyScripter is to reinitialize the remote python interpreter over and over again. If you found a way around that I would be glad to hear about it. To the rest: Might there be a way to mimick IPython's behavior of 'creating separate threads' (or whatever it might be that makes IPython do the trick) while importing matplotlib? IPython is great but having an editor/integrated debugger with all the other goodies that PyScripter offers PLUS interactive matplotlib-plotting would be even greater... Cheers, Thomas ----- Original Message ----- From: "Elfnor" <el...@gm...> To: <mat...@li...> Sent: Wednesday, December 03, 2008 11:05 PM Subject: [Matplotlib-users] Can matplotlib be run from PythonWin IDE ininteractive mode? > > Hi > > I'm giving an introductory talk on matplotlib to colleagues next week. I'd > like to run matplotlib in interactive mode from the PythonWin IDE. Is this > possible? > > I use PyScripter or occasionally IPython myself, but the python group I'm > talking to have all been set up with PythonWin and my brief is to avoid > confusing then with another IDE. > > thanks Eleanor > -- > View this message in context: > http://www.nabble.com/Can-matplotlib-be-run-from-PythonWin-IDE-in-interactive-mode--tp20822638p20822638.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > > |
From: Elfnor <el...@gm...> - 2008-12-08 01:00:17
|
Thomas Pfaff-3 wrote: > > Hi, > > does that mean that it works for you with PyScripter? > Right now the only way to do more than one plot with MPL with PyScripter > is > to reinitialize the remote python interpreter over and over again. > If you found a way around that I would be glad to hear about it. > > ... > I can get two plots from Pyscripter as follows: Find out where your matplotlibrc file is >>> import matplotlib >>>matplotlib.get_configdir() 'H:\\.matplotlib' edit the matplotlib file in this directory (or copy the example from the matplotlib site)to set interactive to True and the backend to one of the Tk or wx options: backend : WXAgg ... interactive : True # see http://matplotlib.sourceforge.net/interactive.html make sure there is no # at the front of the interactive line Choose the matching external Python Engine in PyScripter ie. Run>Python Engine > Remote (Wx) Then this example should give two interactive plots: >>> import pylab >>> pylab.figure(1) >>> pylab.plot([1,2,3]) >>> pylab.xlabel('X label for 1st plot') >>> pylab.figure(2) >>> pylab.plot([10,20,30]) >>> pylab.xlabel('X label for 2nd plot') go back and add a y label to the first plot >>> pylab.figure(1) >>> pylab.ylabel('Y label for 1st plot') -- View this message in context: http://www.nabble.com/Can-matplotlib-be-run-from-PythonWin-IDE-in-interactive-mode--tp20822638p20888060.html Sent from the matplotlib - users mailing list archive at Nabble.com. |