From: Ryugan M. <ryu...@sb...> - 2004-06-16 09:06:34
|
Thanks for all who gave me a reply.... Somehow the following script worked...: import matplotlib matplotlib.interactive(False) matplotlib.use("WX") from matplotlib.matlab import * plot([1,2,3,4]) show() Thanks all for the help. Ryugan |
From: Barry D. <bl...@ad...> - 2004-06-16 12:16:22
|
Ryugan, Thanks. That fixed my problem as well: the graph window disappearing after the call to show(). Barry --- Ryugan Mizuta wrote: > Thanks for all who gave me a reply.... > > Somehow the following script worked...: > > import matplotlib > matplotlib.interactive(False) > matplotlib.use("WX") > > from matplotlib.matlab import * > plot([1,2,3,4]) > show() > > Thanks all for the help. > > Ryugan > > |
From: John H. <jdh...@ac...> - 2004-06-16 12:32:32
|
>>>>> "Barry" == Barry Drake <bl...@ad...> writes: Barry> Ryugan, Thanks. That fixed my problem as well: the graph Barry> window disappearing after the call to show(). Hi Barry, import matplotlib matplotlib.interactive(False) matplotlib.use("WX") from matplotlib.matlab import * plot([1,2,3,4]) show() Which line is responsible for the fix? And are you using WX or WXAgg? JDH |
From: Barry D. <bl...@ad...> - 2004-06-16 13:23:36
|
John, I ran the tests mentioned in a previous msg with both WX and WXAgg. Should also mention that the test with Idle doesn't completely fail. That is the graph window is displayed and the program "appears" to terminate normally. It looks like some memory is being left hanging and Idle, the OS, or matplotlib is trying to write there on subsequent runs of the program (?). Barry --- John Hunter wrote: > >>>>> "Barry" == Barry Drake > writes: > > Barry> Ryugan, Thanks. That fixed my problem as > well: the graph > Barry> window disappearing after the call to > show(). > > Hi Barry, > > import matplotlib > matplotlib.interactive(False) > matplotlib.use("WX") > > from matplotlib.matlab import * > plot([1,2,3,4]) > show() > > Which line is responsible for the fix? And are you > using WX or WXAgg? > > JDH > > > ------------------------------------------------------- > This SF.Net email is sponsored by The 2004 > JavaOne(SM) Conference > Learn from the experts at JavaOne(SM), Sun's > Worldwide Java Developer > Conference, June 28 - July 1 at the Moscone Center > in San Francisco, CA > REGISTER AND SAVE! http://java.sun.com/javaone/sf > Priority Code NWMGYKND > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: John H. <jdh...@ac...> - 2004-06-16 12:20:29
|
>>>>> "Ryugan" == Ryugan Mizuta <ryu...@sb...> writes: Ryugan> Thanks for all who gave me a reply.... Somehow the Ryugan> following script worked...: import matplotlib matplotlib.interactive(False) matplotlib.use("WX") from matplotlib.matlab import * plot([1,2,3,4]) show() I just want to point out that in my opinion, the easiest way to set the default backend is to use your matplotlibrc file - http://matplotlib.sourceforge.net/faq.html#MATPLOTLIBRC. For windows, this is found at C:\Python23\share\matplotlib\.matplotlibrc. You can achieve the same effect by setting backend : WX # the default backend interactive : False # see http://matplotlib.sourceforge.net/interactive.html which will not be so invasive to your script (ie, you can change the default behavior of your scripts w/o changing the scripts themselves). Using import matplotlib matplotlib.interactive(False) matplotlib.use("WX") should be something you reserve to depart from the desired default behavior. Glad it's working for you! I have two more questions I am curious about, for both you and Barry * Does WXAgg also work? * In which IDEs do you find this combination works? Following your question yesterday I added the FAQ entry http://matplotlib.sourceforge.net/faq.html#FREEZE, and I'd like to update it to make it as complete as possible. JDH |
From: Barry D. <bl...@ad...> - 2004-06-16 13:07:55
|
John, I tested with DrPython 2.4.2, PyPe 1.9, PythonWin, Idle, SciTE 1.6, and, my usual dev environment, UltraEdit 10.20b. Only SciTE hasn't worked so far; it exits with the error: Fatal Python error: PyEval_RestoreThread: NULL tstate Even from a Win shell (DOS) the disappearing window problem occurred until I inserted the line matplotlib.interactive(False) Idle seems to fail on the second run with error: Unhandled exception at 0x1e0078d4 in pythonw.exe: 0xC0000005: Access violation reading location 0x00000004. In the MS debugger I see the disassembled code: 1E0078CF nop 1E0078D0 mov edx,dword ptr [esp+4] 1E0078D4 mov ecx,dword ptr [edx+4] where it breaks on the last line. Thanks for the pointer on the matplotlibrc file. I'll switch to using that from now on (more *nix-like anyway). Barry --- John Hunter wrote: > >>>>> "Ryugan" == Ryugan Mizuta > <ryu...@sb...> writes: > > Ryugan> Thanks for all who gave me a reply.... > Somehow the > Ryugan> following script worked...: > > import matplotlib > matplotlib.interactive(False) > matplotlib.use("WX") > > from matplotlib.matlab import * > plot([1,2,3,4]) > show() > > > I just want to point out that in my opinion, the > easiest way to set > the default backend is to use your matplotlibrc file > - > http://matplotlib.sourceforge.net/faq.html#MATPLOTLIBRC. > For windows, > this is found at > C:\Python23\share\matplotlib\.matplotlibrc. > > You can achieve the same effect by setting > > backend : WX # the default backend > interactive : False # see > http://matplotlib.sourceforge.net/interactive.html > > which will not be so invasive to your script (ie, > you can change the > default behavior of your scripts w/o changing the > scripts > themselves). Using > > import matplotlib > matplotlib.interactive(False) > matplotlib.use("WX") > > should be something you reserve to depart from the > desired default > behavior. > > Glad it's working for you! I have two more > questions I am curious > about, for both you and Barry > > * Does WXAgg also work? > > * In which IDEs do you find this combination > works? > > Following your question yesterday I added the FAQ > entry > http://matplotlib.sourceforge.net/faq.html#FREEZE, > and I'd like to > update it to make it as complete as possible. > > JDH > > > ------------------------------------------------------- > This SF.Net email is sponsored by The 2004 > JavaOne(SM) Conference > Learn from the experts at JavaOne(SM), Sun's > Worldwide Java Developer > Conference, June 28 - July 1 at the Moscone Center > in San Francisco, CA > REGISTER AND SAVE! http://java.sun.com/javaone/sf > Priority Code NWMGYKND > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Ryugan M. <ryu...@sb...> - 2004-06-16 16:26:56
|
I ran the following script on IDLE and the Boa-constructor. I had a problem on both of these when I didn't include: matplot.interactive(False) Thanks for the info on matplotlibrc. ----- Original Message ----- From: "John Hunter" <jdh...@ac...> To: "Ryugan Mizuta" <ryu...@sb...> Cc: <mat...@li...>; "Barry Drake" <bl...@ad...> Sent: Wednesday, June 16, 2004 6:56 AM Subject: Re: [Matplotlib-users] Re:Newbie Question... > >>>>> "Ryugan" == Ryugan Mizuta <ryu...@sb...> writes: > > Ryugan> Thanks for all who gave me a reply.... Somehow the > Ryugan> following script worked...: > > import matplotlib > matplotlib.interactive(False) > matplotlib.use("WX") > > from matplotlib.matlab import * > plot([1,2,3,4]) > show() > > > I just want to point out that in my opinion, the easiest way to set > the default backend is to use your matplotlibrc file - > http://matplotlib.sourceforge.net/faq.html#MATPLOTLIBRC. For windows, > this is found at C:\Python23\share\matplotlib\.matplotlibrc. > > You can achieve the same effect by setting > > backend : WX # the default backend > interactive : False # see http://matplotlib.sourceforge.net/interactive.html > > which will not be so invasive to your script (ie, you can change the > default behavior of your scripts w/o changing the scripts > themselves). Using > > import matplotlib > matplotlib.interactive(False) > matplotlib.use("WX") > > should be something you reserve to depart from the desired default > behavior. > > Glad it's working for you! I have two more questions I am curious > about, for both you and Barry > > * Does WXAgg also work? > > * In which IDEs do you find this combination works? > > Following your question yesterday I added the FAQ entry > http://matplotlib.sourceforge.net/faq.html#FREEZE, and I'd like to > update it to make it as complete as possible. > > JDH |