You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
| 2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
| 2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
| 2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
| 2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
| 2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
| 2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
| 2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
| 2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
| 2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
| 2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
| 2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
| 2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
| 2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
1
(20) |
2
(16) |
3
(9) |
4
(12) |
5
(14) |
6
(22) |
|
7
(17) |
8
(33) |
9
(26) |
10
(32) |
11
(47) |
12
(26) |
13
(7) |
|
14
(24) |
15
(44) |
16
(42) |
17
(22) |
18
(31) |
19
(8) |
20
(4) |
|
21
(15) |
22
(27) |
23
(41) |
24
(33) |
25
(31) |
26
(24) |
27
(10) |
|
28
(20) |
|
|
|
|
|
|
|
From: Michiel de H. <mjl...@ya...> - 2010-02-09 23:56:17
|
I wasn't able to replicate this problem with the Mac OS X backend with matplotlib 0.99.1.1. Both the on-screen figure and the ps output look fine. --Michiel. --- On Tue, 2/9/10, Jae-Joon Lee <lee...@gm...> wrote: > From: Jae-Joon Lee <lee...@gm...> > Subject: Re: [Matplotlib-users] hatching problem > To: "Tomasz Koziara" <t.k...@ci...> > Cc: mat...@li... > Date: Tuesday, February 9, 2010, 10:42 AM > I cannot reproduce it with Agg > backend and ps backend. I tried both > svn version and 0.99 maint. version. > So, maybe this is a bug in mac os X backend? > Do you see a same problem with the ps output? If so, can > you post your > ouput ps file? > > Regards, > > -JJ > > > On Mon, Feb 8, 2010 at 3:26 PM, Tomasz Koziara > <t.k...@ci...> > wrote: > > Dear Users/Developers > > > > I just installed version 0.99.1.1 since in my previous > version (0.98) I had > > problems with hatching. It seems though that the same > problems persist in > > the current version. The attached files reproduce the > problem (a data file > > and a python short script). Note that hatching is not > present on all green > > 'CONUPD' fields - but only on few of them. > > > > I will appreciate some hints on how to get by, > > Regards > > Tomek > > > > =================== > > > > > > > > > > > > > > =================== > > > > dh178-192:tkp5 tomek$ python plots.py > --verbose-helpful > > $HOME=/Users/tomek > > CONFIGDIR=/Users/tomek/.matplotlib > > matplotlib data path > /Library/Python/2.5/site-packages/matplotlib/mpl-data > > loaded rc file > > > /Library/Python/2.5/site-packages/matplotlib/mpl-data/matplotlibrc > > matplotlib version 0.99.1.1 > > verbose.level helpful > > interactive is False > > units is False > > platform is darwin > > Using fontManager instance from > /Users/tomek/.matplotlib/fontList.cache > > backend MacOSX version unknown > > findfont: Matching > > > :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium > > to Bitstream Vera Sans > > > (/Library/Python/2.5/site-packages/matplotlib-0.98.6svn-py2.5-macosx-10.3-fat.egg/matplotlib/mpl-data/fonts/ttf/Vera.ttf) > > with score of 0.000000 > > findfont: Matching > > > :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=large > > to Bitstream Vera Sans > > > (/Library/Python/2.5/site-packages/matplotlib-0.98.6svn-py2.5-macosx-10.3-fat.egg/matplotlib/mpl-data/fonts/ttf/Vera.ttf) > > with score of 0.000000 > > > > > > > ------------------------------------------------------------------------------ > > The Planet: dedicated and managed hosting, cloud > storage, colocation > > Stay online with enterprise data centers and the best > network in the > > business > > Choose flexible plans and management services without > long-term contracts > > Personal 24x7 support from experience hosting pros > just a phone call away. > > http://p.sf.net/sfu/theplanet-com > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, > colocation > Stay online with enterprise data centers and the best > network in the business > Choose flexible plans and management services without > long-term contracts > Personal 24x7 support from experience hosting pros just a > phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Christoph G. <cg...@uc...> - 2010-02-09 21:35:21
|
I can now reproduce this. It seems the same old problem that PythonWin can not reliably run matplotlib because successive runs of the script use the same interpreter. Ipython should work. Append pylab.close() to your script; at least it will not crash on the second run. -- Christoph On 2/9/2010 10:44 AM, Lee Boger wrote: > > Although, if I close the figure then re-run the script, a new figure > pops up but it doesn't have any data plotted. Interpreter is now locked > up. I'm still not fixing it completely. There is also no figure stored > as a file log_plot. > > Lee > > > *Christoph Gohlke <cg...@uc...>* > > 02/09/2010 01:23 PM > > > To > Lee Boger <Bog...@ca...> > cc > > Subject > Re: [Matplotlib-users] Runtime Error - Need Advice > > > > > > Caterpillar: Confidential Green Retain Until: 03/11/2010 > > > > > Change the last line to pylab.show() and it should work. > > Anyway, this example should not crash the interpreter. I can reproduce > the crash on Python 2.4, 2.5, and 2.6 (32 and 64 bit) on Windows with > mpl 0.99.1 but not on Ubuntu 9.1 with mpl 0.99.0. > > The shortest example that crashes is: > > python -c "import pylab;pylab.subplot(111).figure.show()" > > or on the interactive prompt: > >>>> import pylab >>>> pylab.subplot(111).figure.show() >>>> exit() > Fatal Python error: PyEval_RestoreThread: NULL tstate > > This application has requested the Runtime to terminate it in an unusual > way. > Please contact the application's support team for more information. > > > -- Christoph > > On 2/9/2010 7:57 AM, Lee Boger wrote: >> >> Windows XP Professional with Python 2.5 installed (pywin32 build 210) - >> came with dSPACE software package >> >> Downloaded and installed matplotlib-0.99.1.win32-py2.5.exe from >> sourceforge.net >> >> Downloaded and installed numpy-1.4.0-win32-superpack-python2.5.exe from >> sourceforge.net >> >> Executing the following simple "log plot" script within PythonWin: >> >> *from* matplotlib *import* pylab >> >> # Create some artificial data. >> test_frequency = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, >> 17, 18, 19, 20] >> test_results = [-0.2, -0.7, -1.0, -1.5, -2.0, -2.5, -3.0, -3.5, -4, -5, >> -6, -7.1, -8, -9, -10, -11, -12, -15, -20, -25] >> spec_frequency = [6, 8] >> spec_results = [-3.0, -3.0] >> >> # Plot >> figure = pylab.subplot(111) >> figure.semilogx() >> figure.scatter(test_frequency, test_results, s=20, c='b', marker='s', >> edgecolors='none') >> figure.scatter(spec_frequency, spec_results, s=40, c='g', marker='s', >> edgecolors='none') >> figure.grid(True) >> figure.set_xlabel(r"Frequency (Hz)", fontsize = 12) >> figure.set_ylabel(r"Actuator Response (db)", fontsize = 12) >> >> figure.figure.savefig('log_plot') >> figure.figure.show() >> >> >> Plots a figure on the screen that looks correct, then the following >> error (when I click OK, PythonWin closes) >> >> >> >> Any advice would be appreciated. Maybe it's an installation or setup >> issue, but I'm pretty knew to Python programming and don't know how to >> debug this. >> >> Lee Boger >> >> >> >> ------------------------------------------------------------------------------ >> The Planet: dedicated and managed hosting, cloud storage, colocation >> Stay online with enterprise data centers and the best network in the > business >> Choose flexible plans and management services without long-term contracts >> Personal 24x7 support from experience hosting pros just a phone call away. >> http://p.sf.net/sfu/theplanet-com >> >> >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Ted K. <ted...@go...> - 2010-02-09 20:40:29
|
Paul The example works fine and was quite instructive. Thx. Ted On 8 February 2010 21:41, <PH...@ge...> wrote: > Ted, > > > > How does this example run for you? > > > http://matplotlib.sourceforge.net/examples/pylab_examples/griddata_demo.html > > > > *From:* Ted Kord [mailto:ted...@go...] > *Sent:* Monday, February 08, 2010 12:00 PM > *To:* Paul Hobson > *Cc:* mat...@li... > *Subject:* Re: [Matplotlib-users] Surface Plot > > > > On 8 February 2010 17:37, <PH...@ge...> wrote: > > Hey Ted, > > I don't quite understand how you're getting the Z data below. But if you > have 3D data in X, Y, and Z 1D-arrays, the griddata function should work for > you. > > http://matplotlib.sourceforge.net/api/mlab_api.html#matplotlib.mlab.griddata > > HTH, > -paul > > > > Hi Paul > > > > Is there a way to colour the output? For some reason, the final output is > in a single colour even though I've specified cm.jet for the colour map. > > > > Regards > > > > Ted > > > |
|
From: Lee B. <Bog...@ca...> - 2010-02-09 20:16:59
|
Python version 2.5.1, Tk version 8.4, IDLE version 1.2.1
Lee
Christoph Gohlke <cg...@uc...>
02/09/2010 03:08 PM
To
matplotlib-users <mat...@li...>
cc
Subject
Re: [Matplotlib-users] Runtime Error - Need Advice
Caterpillar: Confidential Green Retain Until: 03/11/2010
I am not sure what's going on. The script you posted imports pylab in
the first line. It should be defined. The scrit works just fine after
the proposed changes, even from Pythonwin. Did you completely quit
Pythonwin after the crashes and made sure no corrupted python instance
was left running? Please send the version string of your python
installation.
Christoph
On 2/9/2010 11:10 AM, Lee Boger wrote:
>
> Per another suggestion, I did uninstall numpy 1.4 and installed numpy
> 1.3, but got the same results. Using pylab.savefig('log_plot) resulted
> in the following error:
>
> Traceback (most recent call last):
> File "C:\Program Files\Common
>
Files\dSPACE\Python25\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py",
> line 310, in RunScript
> exec codeObject in __main__.__dict__
> File "C:\Documents and Settings\BogerLC\My Documents\Script2.py", line
> 20, in <module>
> pylab.savefig('log_plot')
> NameError: name 'pylab' is not defined
>
> Using pyplot.savefig('log_plot') does not have an error, but I still get
> no file saved. Maybe it is a "backend" thing, which I know nothing
> about. I'll look into it. Thanks.
>
> Lee
>
>
> *Christoph Gohlke <cg...@uc...>*
>
> 02/09/2010 02:03 PM
>
>
> To
> matplotlib-users <mat...@li...>
> cc
>
> Subject
> Re: [Matplotlib-users] Runtime Error - Need Advice
>
>
>
>
>
> Caterpillar: Confidential Green Retain Until: 03/11/2010
>
>
>
>
> Use pylab.savefig('log_plot'). Also saving the figure to file and
> showing it interactively in the same script might involve switching
> backends, which might not work as expected.
>
> It is advisable to downgrade to numpy 1.3.
>
> -- Christoph
>
> On 2/9/2010 10:44 AM, Lee Boger wrote:
>>
>> Although, if I close the figure then re-run the script, a new figure
>> pops up but it doesn't have any data plotted. Interpreter is now locked
>> up. I'm still not fixing it completely. There is also no figure stored
>> as a file log_plot.
>>
>> Lee
>>
>>
>> *Christoph Gohlke <cg...@uc...>*
>>
>> 02/09/2010 01:23 PM
>>
>>
>> To
>> Lee Boger <Bog...@ca...>
>> cc
>>
>> Subject
>> Re: [Matplotlib-users] Runtime Error - Need Advice
>>
>>
>>
>>
>>
>> Caterpillar: Confidential Green Retain Until: 03/11/2010
>>
>>
>>
>>
>> Change the last line to pylab.show() and it should work.
>>
>> Anyway, this example should not crash the interpreter. I can reproduce
>> the crash on Python 2.4, 2.5, and 2.6 (32 and 64 bit) on Windows with
>> mpl 0.99.1 but not on Ubuntu 9.1 with mpl 0.99.0.
>>
>> The shortest example that crashes is:
>>
>> python -c "import pylab;pylab.subplot(111).figure.show()"
>>
>> or on the interactive prompt:
>>
>>>>> import pylab
>>>>> pylab.subplot(111).figure.show()
>>>>> exit()
>> Fatal Python error: PyEval_RestoreThread: NULL tstate
>>
>> This application has requested the Runtime to terminate it in an
unusual
>> way.
>> Please contact the application's support team for more information.
>>
>>
>> -- Christoph
>>
>> On 2/9/2010 7:57 AM, Lee Boger wrote:
>>>
>>> Windows XP Professional with Python 2.5 installed (pywin32 build 210)
-
>>> came with dSPACE software package
>>>
>>> Downloaded and installed matplotlib-0.99.1.win32-py2.5.exe from
>>> sourceforge.net
>>>
>>> Downloaded and installed numpy-1.4.0-win32-superpack-python2.5.exe
from
>>> sourceforge.net
>>>
>>> Executing the following simple "log plot" script within PythonWin:
>>>
>>> *from* matplotlib *import* pylab
>>>
>>> # Create some artificial data.
>>> test_frequency = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16,
>>> 17, 18, 19, 20]
>>> test_results = [-0.2, -0.7, -1.0, -1.5, -2.0, -2.5, -3.0, -3.5, -4,
-5,
>>> -6, -7.1, -8, -9, -10, -11, -12, -15, -20, -25]
>>> spec_frequency = [6, 8]
>>> spec_results = [-3.0, -3.0]
>>>
>>> # Plot
>>> figure = pylab.subplot(111)
>>> figure.semilogx()
>>> figure.scatter(test_frequency, test_results, s=20, c='b', marker='s',
>>> edgecolors='none')
>>> figure.scatter(spec_frequency, spec_results, s=40, c='g', marker='s',
>>> edgecolors='none')
>>> figure.grid(True)
>>> figure.set_xlabel(r"Frequency (Hz)", fontsize = 12)
>>> figure.set_ylabel(r"Actuator Response (db)", fontsize = 12)
>>>
>>> figure.figure.savefig('log_plot')
>>> figure.figure.show()
>>>
>>>
>>> Plots a figure on the screen that looks correct, then the following
>>> error (when I click OK, PythonWin closes)
>>>
>>>
>>>
>>> Any advice would be appreciated. Maybe it's an installation or setup
>>> issue, but I'm pretty knew to Python programming and don't know how to
>>> debug this.
>>>
>>> Lee Boger
>>>
>>>
>>>
>>>
>
------------------------------------------------------------------------------
>>> The Planet: dedicated and managed hosting, cloud storage, colocation
>>> Stay online with enterprise data centers and the best network in the
>> business
>>> Choose flexible plans and management services without long-term
contracts
>>> Personal 24x7 support from experience hosting pros just a phone call
away.
>>> http://p.sf.net/sfu/theplanet-com
>>>
>>>
>>>
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business
> Choose flexible plans and management services without long-term
contracts
> Personal 24x7 support from experience hosting pros just a phone call
away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Matplotlib-users mailing list
Mat...@li...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Lee B. <Bog...@ca...> - 2010-02-09 20:11:01
|
I tried something that seems to work consistently - I get the correct plot figure and the correct log_plot.png file created everytime I run the script. >From the Start menu, I chose All Programs-Python2.5-IDLE (Python GUI) instead of All Programs-Python2.5-PythonWin, which creates the Tk Python Shell. I then open the script file and run it. I think you were right. Does this make sense? Lee __________________ Thanks for your help. I'll look into ipython. Lee Eric Firing <ef...@ha...> 02/09/2010 02:31 PM To Lee Boger <Bog...@ca...>, matplotlib-users <mat...@li...> cc Subject Re: [Matplotlib-users] Runtime Error - Need Advice Caterpillar: Confidential Green Retain Until: 03/11/2010 Lee Boger wrote: > > Thanks for the quick feedback. I changed the last line from > figure.figure.show() to pyplot.show() and it worked without crashing the > interpreter. However, if I close the figure then re-run the script, a > new figure pops up but it doesn't have any data plotted. Interpreter is > now locked up, the run-time error occurred and no figure stored as a > file log_plot. I un-installed numpy-1.4.0 and installed numpy-1.3.0, but > the results were as I just described. > > Lee > At this point a Windows user may need to step in. I know nothing about PythonWin. My suspicion is that this is a problem of dueling event loops, and one solution would be to use ipython instead of pythonwin. (Note that you typically need to use "reply to all" on this list, otherwise the reply does not get copied to the list.) Eric > > > *Eric Firing <ef...@ha...>* > > 02/09/2010 01:35 PM > > > To > Lee Boger <Bog...@ca...> > cc > mat...@li... > Subject > Re: [Matplotlib-users] Runtime Error - Need Advice > > > > > > Caterpillar: Confidential Green Retain Until: 03/11/2010 > > > > > Lee Boger wrote: > > > > Windows XP Professional with Python 2.5 installed (pywin32 build 210) - > > came with dSPACE software package > > > > Downloaded and installed matplotlib-0.99.1.win32-py2.5.exe from > > sourceforge.net > > > > Downloaded and installed numpy-1.4.0-win32-superpack-python2.5.exe from > > sourceforge.net > > I suspect this is the problem: numpy-1.4.0 is considered broken and has > been withdrawn. Specifically, it introduces binary incompatibility with > programs compiled against prior versions of numpy, including matplotlib. > If you go back to the numpy sourceforge site now, I think you will see > an earlier version that you can install in place of 1.4.0 (after > removing the latter). > > Eric > > > > > Executing the following simple "log plot" script within PythonWin: > > > > *from* matplotlib *import* pylab > > > > # Create some artificial data. > > test_frequency = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, > > 17, 18, 19, 20] > > test_results = [-0.2, -0.7, -1.0, -1.5, -2.0, -2.5, -3.0, -3.5, -4, -5, > > -6, -7.1, -8, -9, -10, -11, -12, -15, -20, -25] > > spec_frequency = [6, 8] > > spec_results = [-3.0, -3.0] > > > > # Plot > > figure = pylab.subplot(111) > > figure.semilogx() > > figure.scatter(test_frequency, test_results, s=20, c='b', marker='s', > > edgecolors='none') > > figure.scatter(spec_frequency, spec_results, s=40, c='g', marker='s', > > edgecolors='none') > > figure.grid(True) > > figure.set_xlabel(r"Frequency (Hz)", fontsize = 12) > > figure.set_ylabel(r"Actuator Response (db)", fontsize = 12) > > > > figure.figure.savefig('log_plot') > > figure.figure.show() > > > > > > Plots a figure on the screen that looks correct, then the following > > error (when I click OK, PythonWin closes) > > > > > > > > Any advice would be appreciated. Maybe it's an installation or setup > > issue, but I'm pretty knew to Python programming and don't know how to > > debug this. > > > > Lee Boger > |
|
From: Christoph G. <cg...@uc...> - 2010-02-09 20:07:12
|
I am not sure what's going on. The script you posted imports pylab in
the first line. It should be defined. The scrit works just fine after
the proposed changes, even from Pythonwin. Did you completely quit
Pythonwin after the crashes and made sure no corrupted python instance
was left running? Please send the version string of your python
installation.
Christoph
On 2/9/2010 11:10 AM, Lee Boger wrote:
>
> Per another suggestion, I did uninstall numpy 1.4 and installed numpy
> 1.3, but got the same results. Using pylab.savefig('log_plot) resulted
> in the following error:
>
> Traceback (most recent call last):
> File "C:\Program Files\Common
> Files\dSPACE\Python25\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py",
> line 310, in RunScript
> exec codeObject in __main__.__dict__
> File "C:\Documents and Settings\BogerLC\My Documents\Script2.py", line
> 20, in <module>
> pylab.savefig('log_plot')
> NameError: name 'pylab' is not defined
>
> Using pyplot.savefig('log_plot') does not have an error, but I still get
> no file saved. Maybe it is a "backend" thing, which I know nothing
> about. I'll look into it. Thanks.
>
> Lee
>
>
> *Christoph Gohlke <cg...@uc...>*
>
> 02/09/2010 02:03 PM
>
>
> To
> matplotlib-users <mat...@li...>
> cc
>
> Subject
> Re: [Matplotlib-users] Runtime Error - Need Advice
>
>
>
>
>
> Caterpillar: Confidential Green Retain Until: 03/11/2010
>
>
>
>
> Use pylab.savefig('log_plot'). Also saving the figure to file and
> showing it interactively in the same script might involve switching
> backends, which might not work as expected.
>
> It is advisable to downgrade to numpy 1.3.
>
> -- Christoph
>
> On 2/9/2010 10:44 AM, Lee Boger wrote:
>>
>> Although, if I close the figure then re-run the script, a new figure
>> pops up but it doesn't have any data plotted. Interpreter is now locked
>> up. I'm still not fixing it completely. There is also no figure stored
>> as a file log_plot.
>>
>> Lee
>>
>>
>> *Christoph Gohlke <cg...@uc...>*
>>
>> 02/09/2010 01:23 PM
>>
>>
>> To
>> Lee Boger <Bog...@ca...>
>> cc
>>
>> Subject
>> Re: [Matplotlib-users] Runtime Error - Need Advice
>>
>>
>>
>>
>>
>> Caterpillar: Confidential Green Retain Until: 03/11/2010
>>
>>
>>
>>
>> Change the last line to pylab.show() and it should work.
>>
>> Anyway, this example should not crash the interpreter. I can reproduce
>> the crash on Python 2.4, 2.5, and 2.6 (32 and 64 bit) on Windows with
>> mpl 0.99.1 but not on Ubuntu 9.1 with mpl 0.99.0.
>>
>> The shortest example that crashes is:
>>
>> python -c "import pylab;pylab.subplot(111).figure.show()"
>>
>> or on the interactive prompt:
>>
>>>>> import pylab
>>>>> pylab.subplot(111).figure.show()
>>>>> exit()
>> Fatal Python error: PyEval_RestoreThread: NULL tstate
>>
>> This application has requested the Runtime to terminate it in an unusual
>> way.
>> Please contact the application's support team for more information.
>>
>>
>> -- Christoph
>>
>> On 2/9/2010 7:57 AM, Lee Boger wrote:
>>>
>>> Windows XP Professional with Python 2.5 installed (pywin32 build 210) -
>>> came with dSPACE software package
>>>
>>> Downloaded and installed matplotlib-0.99.1.win32-py2.5.exe from
>>> sourceforge.net
>>>
>>> Downloaded and installed numpy-1.4.0-win32-superpack-python2.5.exe from
>>> sourceforge.net
>>>
>>> Executing the following simple "log plot" script within PythonWin:
>>>
>>> *from* matplotlib *import* pylab
>>>
>>> # Create some artificial data.
>>> test_frequency = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
>>> 17, 18, 19, 20]
>>> test_results = [-0.2, -0.7, -1.0, -1.5, -2.0, -2.5, -3.0, -3.5, -4, -5,
>>> -6, -7.1, -8, -9, -10, -11, -12, -15, -20, -25]
>>> spec_frequency = [6, 8]
>>> spec_results = [-3.0, -3.0]
>>>
>>> # Plot
>>> figure = pylab.subplot(111)
>>> figure.semilogx()
>>> figure.scatter(test_frequency, test_results, s=20, c='b', marker='s',
>>> edgecolors='none')
>>> figure.scatter(spec_frequency, spec_results, s=40, c='g', marker='s',
>>> edgecolors='none')
>>> figure.grid(True)
>>> figure.set_xlabel(r"Frequency (Hz)", fontsize = 12)
>>> figure.set_ylabel(r"Actuator Response (db)", fontsize = 12)
>>>
>>> figure.figure.savefig('log_plot')
>>> figure.figure.show()
>>>
>>>
>>> Plots a figure on the screen that looks correct, then the following
>>> error (when I click OK, PythonWin closes)
>>>
>>>
>>>
>>> Any advice would be appreciated. Maybe it's an installation or setup
>>> issue, but I'm pretty knew to Python programming and don't know how to
>>> debug this.
>>>
>>> Lee Boger
>>>
>>>
>>>
>>>
> ------------------------------------------------------------------------------
>>> The Planet: dedicated and managed hosting, cloud storage, colocation
>>> Stay online with enterprise data centers and the best network in the
>> business
>>> Choose flexible plans and management services without long-term contracts
>>> Personal 24x7 support from experience hosting pros just a phone call away.
>>> http://p.sf.net/sfu/theplanet-com
>>>
>>>
>>>
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Lee B. <Bog...@ca...> - 2010-02-09 19:53:58
|
Thanks for your help. I'll look into ipython. Lee Eric Firing <ef...@ha...> 02/09/2010 02:31 PM To Lee Boger <Bog...@ca...>, matplotlib-users <mat...@li...> cc Subject Re: [Matplotlib-users] Runtime Error - Need Advice Caterpillar: Confidential Green Retain Until: 03/11/2010 Lee Boger wrote: > > Thanks for the quick feedback. I changed the last line from > figure.figure.show() to pyplot.show() and it worked without crashing the > interpreter. However, if I close the figure then re-run the script, a > new figure pops up but it doesn't have any data plotted. Interpreter is > now locked up, the run-time error occurred and no figure stored as a > file log_plot. I un-installed numpy-1.4.0 and installed numpy-1.3.0, but > the results were as I just described. > > Lee > At this point a Windows user may need to step in. I know nothing about PythonWin. My suspicion is that this is a problem of dueling event loops, and one solution would be to use ipython instead of pythonwin. (Note that you typically need to use "reply to all" on this list, otherwise the reply does not get copied to the list.) Eric > > > *Eric Firing <ef...@ha...>* > > 02/09/2010 01:35 PM > > > To > Lee Boger <Bog...@ca...> > cc > mat...@li... > Subject > Re: [Matplotlib-users] Runtime Error - Need Advice > > > > > > Caterpillar: Confidential Green Retain Until: 03/11/2010 > > > > > Lee Boger wrote: > > > > Windows XP Professional with Python 2.5 installed (pywin32 build 210) - > > came with dSPACE software package > > > > Downloaded and installed matplotlib-0.99.1.win32-py2.5.exe from > > sourceforge.net > > > > Downloaded and installed numpy-1.4.0-win32-superpack-python2.5.exe from > > sourceforge.net > > I suspect this is the problem: numpy-1.4.0 is considered broken and has > been withdrawn. Specifically, it introduces binary incompatibility with > programs compiled against prior versions of numpy, including matplotlib. > If you go back to the numpy sourceforge site now, I think you will see > an earlier version that you can install in place of 1.4.0 (after > removing the latter). > > Eric > > > > > Executing the following simple "log plot" script within PythonWin: > > > > *from* matplotlib *import* pylab > > > > # Create some artificial data. > > test_frequency = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, > > 17, 18, 19, 20] > > test_results = [-0.2, -0.7, -1.0, -1.5, -2.0, -2.5, -3.0, -3.5, -4, -5, > > -6, -7.1, -8, -9, -10, -11, -12, -15, -20, -25] > > spec_frequency = [6, 8] > > spec_results = [-3.0, -3.0] > > > > # Plot > > figure = pylab.subplot(111) > > figure.semilogx() > > figure.scatter(test_frequency, test_results, s=20, c='b', marker='s', > > edgecolors='none') > > figure.scatter(spec_frequency, spec_results, s=40, c='g', marker='s', > > edgecolors='none') > > figure.grid(True) > > figure.set_xlabel(r"Frequency (Hz)", fontsize = 12) > > figure.set_ylabel(r"Actuator Response (db)", fontsize = 12) > > > > figure.figure.savefig('log_plot') > > figure.figure.show() > > > > > > Plots a figure on the screen that looks correct, then the following > > error (when I click OK, PythonWin closes) > > > > > > > > Any advice would be appreciated. Maybe it's an installation or setup > > issue, but I'm pretty knew to Python programming and don't know how to > > debug this. > > > > Lee Boger > |
|
From: Eric F. <ef...@ha...> - 2010-02-09 19:31:22
|
Lee Boger wrote: > > Thanks for the quick feedback. I changed the last line from > figure.figure.show() to pyplot.show() and it worked without crashing the > interpreter. However, if I close the figure then re-run the script, a > new figure pops up but it doesn't have any data plotted. Interpreter is > now locked up, the run-time error occurred and no figure stored as a > file log_plot. I un-installed numpy-1.4.0 and installed numpy-1.3.0, but > the results were as I just described. > > Lee > At this point a Windows user may need to step in. I know nothing about PythonWin. My suspicion is that this is a problem of dueling event loops, and one solution would be to use ipython instead of pythonwin. (Note that you typically need to use "reply to all" on this list, otherwise the reply does not get copied to the list.) Eric > > > *Eric Firing <ef...@ha...>* > > 02/09/2010 01:35 PM > > > To > Lee Boger <Bog...@ca...> > cc > mat...@li... > Subject > Re: [Matplotlib-users] Runtime Error - Need Advice > > > > > > Caterpillar: Confidential Green Retain Until: 03/11/2010 > > > > > Lee Boger wrote: > > > > Windows XP Professional with Python 2.5 installed (pywin32 build 210) - > > came with dSPACE software package > > > > Downloaded and installed matplotlib-0.99.1.win32-py2.5.exe from > > sourceforge.net > > > > Downloaded and installed numpy-1.4.0-win32-superpack-python2.5.exe from > > sourceforge.net > > I suspect this is the problem: numpy-1.4.0 is considered broken and has > been withdrawn. Specifically, it introduces binary incompatibility with > programs compiled against prior versions of numpy, including matplotlib. > If you go back to the numpy sourceforge site now, I think you will see > an earlier version that you can install in place of 1.4.0 (after > removing the latter). > > Eric > > > > > Executing the following simple "log plot" script within PythonWin: > > > > *from* matplotlib *import* pylab > > > > # Create some artificial data. > > test_frequency = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, > > 17, 18, 19, 20] > > test_results = [-0.2, -0.7, -1.0, -1.5, -2.0, -2.5, -3.0, -3.5, -4, -5, > > -6, -7.1, -8, -9, -10, -11, -12, -15, -20, -25] > > spec_frequency = [6, 8] > > spec_results = [-3.0, -3.0] > > > > # Plot > > figure = pylab.subplot(111) > > figure.semilogx() > > figure.scatter(test_frequency, test_results, s=20, c='b', marker='s', > > edgecolors='none') > > figure.scatter(spec_frequency, spec_results, s=40, c='g', marker='s', > > edgecolors='none') > > figure.grid(True) > > figure.set_xlabel(r"Frequency (Hz)", fontsize = 12) > > figure.set_ylabel(r"Actuator Response (db)", fontsize = 12) > > > > figure.figure.savefig('log_plot') > > figure.figure.show() > > > > > > Plots a figure on the screen that looks correct, then the following > > error (when I click OK, PythonWin closes) > > > > > > > > Any advice would be appreciated. Maybe it's an installation or setup > > issue, but I'm pretty knew to Python programming and don't know how to > > debug this. > > > > Lee Boger > |
|
From: Christoph G. <cg...@uc...> - 2010-02-09 19:02:07
|
Use pylab.savefig('log_plot'). Also saving the figure to file and
showing it interactively in the same script might involve switching
backends, which might not work as expected.
It is advisable to downgrade to numpy 1.3.
-- Christoph
On 2/9/2010 10:44 AM, Lee Boger wrote:
>
> Although, if I close the figure then re-run the script, a new figure
> pops up but it doesn't have any data plotted. Interpreter is now locked
> up. I'm still not fixing it completely. There is also no figure stored
> as a file log_plot.
>
> Lee
>
>
> *Christoph Gohlke <cg...@uc...>*
>
> 02/09/2010 01:23 PM
>
>
> To
> Lee Boger <Bog...@ca...>
> cc
>
> Subject
> Re: [Matplotlib-users] Runtime Error - Need Advice
>
>
>
>
>
> Caterpillar: Confidential Green Retain Until: 03/11/2010
>
>
>
>
> Change the last line to pylab.show() and it should work.
>
> Anyway, this example should not crash the interpreter. I can reproduce
> the crash on Python 2.4, 2.5, and 2.6 (32 and 64 bit) on Windows with
> mpl 0.99.1 but not on Ubuntu 9.1 with mpl 0.99.0.
>
> The shortest example that crashes is:
>
> python -c "import pylab;pylab.subplot(111).figure.show()"
>
> or on the interactive prompt:
>
>>>> import pylab
>>>> pylab.subplot(111).figure.show()
>>>> exit()
> Fatal Python error: PyEval_RestoreThread: NULL tstate
>
> This application has requested the Runtime to terminate it in an unusual
> way.
> Please contact the application's support team for more information.
>
>
> -- Christoph
>
> On 2/9/2010 7:57 AM, Lee Boger wrote:
>>
>> Windows XP Professional with Python 2.5 installed (pywin32 build 210) -
>> came with dSPACE software package
>>
>> Downloaded and installed matplotlib-0.99.1.win32-py2.5.exe from
>> sourceforge.net
>>
>> Downloaded and installed numpy-1.4.0-win32-superpack-python2.5.exe from
>> sourceforge.net
>>
>> Executing the following simple "log plot" script within PythonWin:
>>
>> *from* matplotlib *import* pylab
>>
>> # Create some artificial data.
>> test_frequency = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
>> 17, 18, 19, 20]
>> test_results = [-0.2, -0.7, -1.0, -1.5, -2.0, -2.5, -3.0, -3.5, -4, -5,
>> -6, -7.1, -8, -9, -10, -11, -12, -15, -20, -25]
>> spec_frequency = [6, 8]
>> spec_results = [-3.0, -3.0]
>>
>> # Plot
>> figure = pylab.subplot(111)
>> figure.semilogx()
>> figure.scatter(test_frequency, test_results, s=20, c='b', marker='s',
>> edgecolors='none')
>> figure.scatter(spec_frequency, spec_results, s=40, c='g', marker='s',
>> edgecolors='none')
>> figure.grid(True)
>> figure.set_xlabel(r"Frequency (Hz)", fontsize = 12)
>> figure.set_ylabel(r"Actuator Response (db)", fontsize = 12)
>>
>> figure.figure.savefig('log_plot')
>> figure.figure.show()
>>
>>
>> Plots a figure on the screen that looks correct, then the following
>> error (when I click OK, PythonWin closes)
>>
>>
>>
>> Any advice would be appreciated. Maybe it's an installation or setup
>> issue, but I'm pretty knew to Python programming and don't know how to
>> debug this.
>>
>> Lee Boger
>>
>>
>>
>> ------------------------------------------------------------------------------
>> The Planet: dedicated and managed hosting, cloud storage, colocation
>> Stay online with enterprise data centers and the best network in the
> business
>> Choose flexible plans and management services without long-term contracts
>> Personal 24x7 support from experience hosting pros just a phone call away.
>> http://p.sf.net/sfu/theplanet-com
>>
>>
>>
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Eric F. <ef...@ha...> - 2010-02-09 18:35:13
|
Lee Boger wrote: > > Windows XP Professional with Python 2.5 installed (pywin32 build 210) - > came with dSPACE software package > > Downloaded and installed matplotlib-0.99.1.win32-py2.5.exe from > sourceforge.net > > Downloaded and installed numpy-1.4.0-win32-superpack-python2.5.exe from > sourceforge.net I suspect this is the problem: numpy-1.4.0 is considered broken and has been withdrawn. Specifically, it introduces binary incompatibility with programs compiled against prior versions of numpy, including matplotlib. If you go back to the numpy sourceforge site now, I think you will see an earlier version that you can install in place of 1.4.0 (after removing the latter). Eric > > Executing the following simple "log plot" script within PythonWin: > > *from* matplotlib *import* pylab > > # Create some artificial data. > test_frequency = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, > 17, 18, 19, 20] > test_results = [-0.2, -0.7, -1.0, -1.5, -2.0, -2.5, -3.0, -3.5, -4, -5, > -6, -7.1, -8, -9, -10, -11, -12, -15, -20, -25] > spec_frequency = [6, 8] > spec_results = [-3.0, -3.0] > > # Plot > figure = pylab.subplot(111) > figure.semilogx() > figure.scatter(test_frequency, test_results, s=20, c='b', marker='s', > edgecolors='none') > figure.scatter(spec_frequency, spec_results, s=40, c='g', marker='s', > edgecolors='none') > figure.grid(True) > figure.set_xlabel(r"Frequency (Hz)", fontsize = 12) > figure.set_ylabel(r"Actuator Response (db)", fontsize = 12) > > figure.figure.savefig('log_plot') > figure.figure.show() > > > Plots a figure on the screen that looks correct, then the following > error (when I click OK, PythonWin closes) > > > > Any advice would be appreciated. Maybe it's an installation or setup > issue, but I'm pretty knew to Python programming and don't know how to > debug this. > > Lee Boger |
|
From: Christoph G. <cg...@uc...> - 2010-02-09 18:26:18
|
Change the last line to pylab.show() and it should work. Anyway, this example should not crash the interpreter. I can reproduce the crash on Python 2.4, 2.5, and 2.6 (32 and 64 bit) on Windows with mpl 0.99.1 but not on Ubuntu 9.1 with mpl 0.99.0. The shortest example that crashes is: python -c "import pylab;pylab.subplot(111).figure.show()" or on the interactive prompt: >>> import pylab >>> pylab.subplot(111).figure.show() >>> exit() Fatal Python error: PyEval_RestoreThread: NULL tstate This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. -- Christoph On 2/9/2010 7:57 AM, Lee Boger wrote: > > > > Windows XP Professional with Python 2.5 installed (pywin32 build 210) - > > came with dSPACE software package > > > > Downloaded and installed matplotlib-0.99.1.win32-py2.5.exe from > > sourceforge.net > > > > Downloaded and installed numpy-1.4.0-win32-superpack-python2.5.exe from > > sourceforge.net > > > > Executing the following simple "log plot" script within PythonWin: > > > > *from* matplotlib *import* pylab > > > > # Create some artificial data. > > test_frequency = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, > > 17, 18, 19, 20] > > test_results = [-0.2, -0.7, -1.0, -1.5, -2.0, -2.5, -3.0, -3.5, -4, -5, > > -6, -7.1, -8, -9, -10, -11, -12, -15, -20, -25] > > spec_frequency = [6, 8] > > spec_results = [-3.0, -3.0] > > > > # Plot > > figure = pylab.subplot(111) > > figure.semilogx() > > figure.scatter(test_frequency, test_results, s=20, c='b', marker='s', > > edgecolors='none') > > figure.scatter(spec_frequency, spec_results, s=40, c='g', marker='s', > > edgecolors='none') > > figure.grid(True) > > figure.set_xlabel(r"Frequency (Hz)", fontsize = 12) > > figure.set_ylabel(r"Actuator Response (db)", fontsize = 12) > > > > figure.figure.savefig('log_plot') > > figure.figure.show() > > > > > > Plots a figure on the screen that looks correct, then the following > > error (when I click OK, PythonWin closes) > > > > > > > > Any advice would be appreciated. Maybe it's an installation or setup > > issue, but I'm pretty knew to Python programming and don't know how to > > debug this. > > > > Lee Boger |
|
From: Wayne W. <sie...@sb...> - 2010-02-09 18:22:16
|
Thanks. Completely missed it. (P.S. Reply All +corrected mail filter.) On 2/9/2010 8:18 AM, John Hunter wrote: > On Tue, Feb 9, 2010 at 10:06 AM, Wayne Watson > <sie...@sb...> wrote: > >> I'm sure not making much progress on understanding show(). When used in >> XP in IDLE or by file execution (click on file name), it seems to tie up >> the executing program. In IDLE, the shell window stops and one must >> ... > http://matplotlib.sourceforge.net/users/shell.html > > We recommend using ipython in pylab model when working interactively > because it is designed to make the correct interactive settings and > override "show" to be non-blocking. You can obtain the right results > in matplotlib using Idle if you are careful, but for "just works out > of the box" ipython in pylab mode will be easier. > > JDH > > -- "Crime is way down. War is declining. And that's far from the good news." -- Steven Pinker (and other sources) Why is this true, but yet the media says otherwise? The media knows very well how to manipulate us (see limbic, emotion, $$). -- WTW |
|
From: John H. <jd...@gm...> - 2010-02-09 17:53:10
|
On Tue, Feb 9, 2010 at 11:36 AM, Wayne Watson <sie...@sb...> wrote: > Thanks for the clarification. I'm really new to this, and do not know of > interactive mode. I presume there's a command to turn it off and on, and > possibly an example on how to do it. Is this method of operation with > show() mentioned anywhere? Yes, on the documentation link I referred you to. JDH |
|
From: Wayne W. <sie...@sb...> - 2010-02-09 17:37:36
|
Thanks. I'll consider it. See my post to John Hunter moments ago as to
why I "must" use IDLE. Basically, the users are not at all familiar with
Python, and historically the us has been that way for 3-4 years.
On 2/9/2010 8:20 AM, Ben Axelrod wrote:
> Maybe instead of plot.show() you should do something like:
>
> plot.draw()
> raw_input('Press ENTER to exit')
>
> Personally, I also use IDLE on Windows XP to edit my matplotlib files. However, I never execute in IDLE. I simply double click the file in windows explorer.
>
> -Ben
>
> -----Original Message-----
> From: Wayne Watson [mailto:sie...@sb...]
> Sent: Tuesday, February 09, 2010 11:07 AM
> To: mat...@li...
> Subject: [Matplotlib-users] Verifying the Use of show()? Win XP
>
> I'm sure not making much progress on understanding show(). When used in XP in IDLE or by file execution (click on file name), it seems to tie up the executing program. In IDLE, the shell window stops and one must exit the window.
>
> I'd appreciate it if someone could take any examples from<http://matplotlib.sourceforge.net/index.html> and try to execute them as in the first paragraph to see if they terminate successfully.Let me know what OS used, hopefully XP, and if you used IDLE or file execution.
> I suspect you will find every example there ends with show(). Try putting a print statement after show() you've done it with the show() the last line.
> --
> "Crime is way down. War is declining. And that's far from the good news." -- Steven Pinker (and other sources) Why is this true, but yet the media says otherwise? The media knows very well how to manipulate us (see limbic, emotion, $$). -- WTW
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
"Crime is way down. War is declining. And that's far from the good
news." -- Steven Pinker (and other sources) Why is this true, but yet
the media says otherwise? The media knows very well how to manipulate us
(see limbic, emotion, $$). -- WTW
|
|
From: Wayne W. <sie...@sb...> - 2010-02-09 17:36:44
|
Thanks for the clarification. I'm really new to this, and do not know of interactive mode. I presume there's a command to turn it off and on, and possibly an example on how to do it. Is this method of operation with show() mentioned anywhere? The unfortunate present use of show() is that it ties up the shell script, where I happened to have written program output. It's handy to put it there, since it's meant to be interactive. The user is keyboard arrowing through images, and statistical data is placed on the shell window. At the same time he sees a plot of data relevant to the image. He needs to close the plot window before going to the next image. I can probably figure out how to kill the plot window when he does that. My problem with using ipython is that the program I'm modifying is used with IDLE, and people have gotten to use it that way. I had nothing to do with that method of op. I doubt any of the users would be agreeable to using ipython. None of them know Python. The next time the program is released, I may provide it in executable form. I used matlab five years ago, for about two months. To see if it could help me understand MPL, I fired it up, and it's now working. Perhaps the interactive op is explained there. I take it there is no show() there? Interesting mention of "non-blocking". In the midst of this dilemma, I started getting socket errors. Using McAffe I found pythonw as blocked. Would that be in anyway associated with the use of show()? I've since changed it to outbound blocking. On 2/9/2010 8:18 AM, John Hunter wrote: > On Tue, Feb 9, 2010 at 10:06 AM, Wayne Watson > <sie...@sb...> wrote: > ... >> the last line. >> > "show" is meant to start the GUI mainloop, which is usually blocking, > and raise all windows, so the behavior you are reporting is the > intended behavior. When working interactively, as in Idle, you > shouldn't need to use show if you turn interactive mode on. > > http://matplotlib.sourceforge.net/users/shell.html > > We recommend using ipython in pylab model when working interactively > because it is designed to make the correct interactive settings and > override "show" to be non-blocking. You can obtain the right results > in matplotlib using Idle if you are careful, but for "just works out > of the box" ipython in pylab mode will be easier. > > JDH > > -- "Crime is way down. War is declining. And that's far from the good news." -- Steven Pinker (and other sources) Why is this true, but yet the media says otherwise? The media knows very well how to manipulate us (see limbic, emotion, $$). -- WTW |
|
From: Jae-Joon L. <lee...@gm...> - 2010-02-09 17:03:49
|
Copying a matplotlib canvas (or a figure, or an axes) is not easy. You cannot just rebind it. You need to copy all the hierarchy of underlying artists. Also the attributes of artists need to be adjusted accordingly. And best option in my opinion is just to create another canvas using the code that created the original canvas. Regards, -JJ On Mon, Feb 8, 2010 at 3:04 PM, <Dav...@se...> wrote: > Hey folks, > > my problem may be obvious, but i can't seem to copy a plot from one canvas > to another. > > # I have this object where whichCanvas is an instance of MplWidget (code > shown below) > > self.whichCanvas.canvas.ax.plot(xData, yData, 'bo', linewidth=1.5, > linestyle='-') > > > > > # I want to copy the plot and axes to another MplWidget object > > self.anotherCanvas.canvas > > > > I've tried: > > self.anotherCanvas.canvas.ax = self.whichCanvas.canvas.ax > self.anotherCanvas.canvas.draw() > > and > > self.anotherCanvas.canvas = self.whichCanvas.canvas > self.anotherCanvas.canvas.draw() > > the plot doesn't seem to copy. Does any body more familiar with matplotlib > have any suggestions? > > > > > > This is the MplWidget Class > ***************************** MplWidget ******************************* > > from PyQt4 import QtGui > from matplotlib.backends.backend_qt4agg \ > import FigureCanvasQTAgg as FigureCanvas > from matplotlib.figure import Figure > > > > > class MplCanvas(FigureCanvas): > def __init__(self): > self.fig = Figure() > self.ax = self.fig.add_subplot(111) > FigureCanvas.__init__(self, self.fig) > FigureCanvas.setSizePolicy(self, > QtGui.QSizePolicy.Expanding, > QtGui.QSizePolicy.Expanding) > FigureCanvas.updateGeometry(self) > > > > > class MplWidget(QtGui.QWidget): > > def __init__(self, parent = None): > QtGui.QWidget.__init__(self, parent) > self.canvas = MplCanvas() > self.vbl = QtGui.QVBoxLayout() > self.vbl.addWidget(self.canvas) > self.setLayout(self.vbl) > > > > Regards, > Dave Tung > > cell: 925-321-6657 > office: 510-353-4770 > dav...@se... > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the > business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Jae-Joon L. <lee...@gm...> - 2010-02-09 16:51:43
|
Figure.draw_artist is just a convenience function.
def draw_artist(self, a):
"""
draw :class:`matplotlib.artist.Artist` instance *a* only --
this is available only after the figure is drawn
"""
assert self._cachedRenderer is not None
a.draw(self._cachedRenderer)
And, all the drawing is done by the artist itself.
>
> Also, other atists don't fail in this manner if I don't use artist.set_figure().
>
As far as I can see, it only means that you're lucky with other artists.
The reason Text artists needs a reference to the figure is to access
the dpi value, as the exception indicates.
All artists are meant to be added to an axes (or at least "axes",
"figure", etc. attributes set appropriately) to work correctly.
Regards,
-JJ
|
|
From: Nick S. <N.S...@du...> - 2010-02-09 16:39:10
|
HI all,
I've been using matplotlip for a while now but mainly for line plots,
scatter plots and the odd dendrogram. I recently tried plotting a
histogram (of a binomial function) and encountered a problem. So I
though I'd try the extremely simple example set on the front of the
matplotlib page.... and heres what I got:
Python 2.4.3 (#1, Sep 3 2009, 15:37:12)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pylab import randn, hist
>>> x = randn(10000)
>>> hist(x, 100)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/site-packages/matplotlib/pyplot.py", line
1633, in hist
ret = gca().hist(*args, **kwargs)
File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line 5060, in hist
align=align, log=log)
File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line 3253, in bar
assert len(height)==nbars, "argument 'height' must be %d or scalar" % nbars
AssertionError: argument 'height' must be 101 or scalar
Any idea why this isn't working? I have matplotlib v0.91.2 - will
updating to 0.99 solve the problem?
--
Cheers,
Nick Schurch
|
|
From: Ben A. <BAx...@co...> - 2010-02-09 16:20:32
|
Maybe instead of plot.show() you should do something like:
plot.draw()
raw_input('Press ENTER to exit')
Personally, I also use IDLE on Windows XP to edit my matplotlib files. However, I never execute in IDLE. I simply double click the file in windows explorer.
-Ben
-----Original Message-----
From: Wayne Watson [mailto:sie...@sb...]
Sent: Tuesday, February 09, 2010 11:07 AM
To: mat...@li...
Subject: [Matplotlib-users] Verifying the Use of show()? Win XP
I'm sure not making much progress on understanding show(). When used in XP in IDLE or by file execution (click on file name), it seems to tie up the executing program. In IDLE, the shell window stops and one must exit the window.
I'd appreciate it if someone could take any examples from <http://matplotlib.sourceforge.net/index.html> and try to execute them as in the first paragraph to see if they terminate successfully.Let me know what OS used, hopefully XP, and if you used IDLE or file execution.
I suspect you will find every example there ends with show(). Try putting a print statement after show() you've done it with the show() the last line.
--
"Crime is way down. War is declining. And that's far from the good news." -- Steven Pinker (and other sources) Why is this true, but yet the media says otherwise? The media knows very well how to manipulate us (see limbic, emotion, $$). -- WTW
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Matplotlib-users mailing list
Mat...@li...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Ben A. <BAx...@co...> - 2010-02-09 16:19:45
|
I see. But why would I need to set the figure manually when I am drawing with a figure? Is it ever the case where you set one figure, but draw with another? For example: textartist.set_figure(fig1) fig2.draw_artist(textartist) Also, other atists don't fail in this manner if I don't use artist.set_figure(). -Ben -----Original Message----- From: Jae-Joon Lee [mailto:lee...@gm...] Sent: Monday, February 08, 2010 6:36 PM To: Ben Axelrod Cc: mat...@li... Subject: Re: [Matplotlib-users] Figure.draw_artist() bug with Text This is not a bug. The exception is raised simply because "textartist.figure" is None (and it is None because you never set it). "textartist" you created is not properly set up (no figure, no axes, no transform). You may do textartist = Text(0.5, 0.5, "Foo") textartist.set_figure(fig) fig.draw_artist(textartist) fig.canvas.blit(fig.bbox) But, this is not the recommended way of doing things. draw_artist is mainly for doing animation. http://matplotlib.sourceforge.net/examples/animation/index.html Regards, -JJ On Mon, Feb 8, 2010 at 4:24 PM, Ben Axelrod <BAx...@co...> wrote: > I am getting a fault when I try to use Figure.draw_artist() with a matplotlib.text.Text object. Since matplotlib.text.Text inherits from matplotlib.artist.Artist, which is what draw_artist() takes, this should probably work. > > Tested with latest SVN code on Linux. > > Here is the traceback: > > Traceback (most recent call last): > File "test.py", line 10, in <module> > fig.draw_artist(textartist) > File "/usr/local/lib/python2.6/site-packages/matplotlib/figure.py", > line 816, in draw_artist > a.draw(self._cachedRenderer) > File "/usr/local/lib/python2.6/site-packages/matplotlib/artist.py", > line 55, in draw_wrapper > draw(artist, renderer, *kl) > File "/usr/local/lib/python2.6/site-packages/matplotlib/text.py", > line 549, in draw > bbox, info = self._get_layout(renderer) > File "/usr/local/lib/python2.6/site-packages/matplotlib/text.py", > line 267, in _get_layout > key = self.get_prop_tup() > File "/usr/local/lib/python2.6/site-packages/matplotlib/text.py", > line 716, in get_prop_tup > self.figure.dpi, id(self._renderer), > AttributeError: 'NoneType' object has no attribute 'dpi' > > And here is some simple code to trigger the bug: > > #!/usr/bin/env python > # display bug in figure.draw_artist(matplotlib.text) > import matplotlib.pyplot as plt > from matplotlib.text import Text > > fig = plt.figure() > plt.draw() > > textartist = Text(0.5, 0.5, "Foo") > fig.draw_artist(textartist) > > plt.show() > #end code > > Note that I still get the bug even when i specify figsize and dpi on the figure like so: > fig = plt.figure(figsize=(2,2), dpi=300) > > -Ben > ---------------------------------------------------------------------- > -------- The Planet: dedicated and managed hosting, cloud storage, > colocation Stay online with enterprise data centers and the best > network in the business Choose flexible plans and management services > without long-term contracts Personal 24x7 support from experience > hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: John H. <jd...@gm...> - 2010-02-09 16:19:44
|
On Tue, Feb 9, 2010 at 10:06 AM, Wayne Watson <sie...@sb...> wrote: > I'm sure not making much progress on understanding show(). When used in > XP in IDLE or by file execution (click on file name), it seems to tie up > the executing program. In IDLE, the shell window stops and one must > exit the window. > > I'd appreciate it if someone could take any examples from > <http://matplotlib.sourceforge.net/index.html> and try to execute them > as in the first paragraph to see if they terminate successfully.Let me > know what OS used, hopefully XP, and if you used IDLE or file execution. > I suspect you will find every example there ends with show(). Try > putting a print statement after show() you've done it with the show() > the last line. "show" is meant to start the GUI mainloop, which is usually blocking, and raise all windows, so the behavior you are reporting is the intended behavior. When working interactively, as in Idle, you shouldn't need to use show if you turn interactive mode on. http://matplotlib.sourceforge.net/users/shell.html We recommend using ipython in pylab model when working interactively because it is designed to make the correct interactive settings and override "show" to be non-blocking. You can obtain the right results in matplotlib using Idle if you are careful, but for "just works out of the box" ipython in pylab mode will be easier. JDH |
|
From: Wayne W. <sie...@sb...> - 2010-02-09 16:19:41
|
Version of Python would help too. I'm using 2.5. On 2/9/2010 8:06 AM, Wayne Watson wrote: > I'm sure not making much progress on understanding show(). When used in > XP in IDLE or by file execution (click on file name), it seems to tie up > the executing program. In IDLE, the shell window stops and one must > exit the window. > > I'd appreciate it if someone could take any examples from > <http://matplotlib.sourceforge.net/index.html> and try to execute them > as in the first paragraph to see if they terminate successfully.Let me > know what OS used, hopefully XP, and if you used IDLE or file execution. > I suspect you will find every example there ends with show(). Try > putting a print statement after show() you've done it with the show() > the last line. > -- "Crime is way down. War is declining. And that's far from the good news." -- Steven Pinker (and other sources) Why is this true, but yet the media says otherwise? The media knows very well how to manipulate us (see limbic, emotion, $$). -- WTW |
|
From: Wayne W. <sie...@sb...> - 2010-02-09 16:06:54
|
I'm sure not making much progress on understanding show(). When used in XP in IDLE or by file execution (click on file name), it seems to tie up the executing program. In IDLE, the shell window stops and one must exit the window. I'd appreciate it if someone could take any examples from <http://matplotlib.sourceforge.net/index.html> and try to execute them as in the first paragraph to see if they terminate successfully.Let me know what OS used, hopefully XP, and if you used IDLE or file execution. I suspect you will find every example there ends with show(). Try putting a print statement after show() you've done it with the show() the last line. -- "Crime is way down. War is declining. And that's far from the good news." -- Steven Pinker (and other sources) Why is this true, but yet the media says otherwise? The media knows very well how to manipulate us (see limbic, emotion, $$). -- WTW |
|
From: Jae-Joon L. <lee...@gm...> - 2010-02-09 15:42:37
|
I cannot reproduce it with Agg backend and ps backend. I tried both svn version and 0.99 maint. version. So, maybe this is a bug in mac os X backend? Do you see a same problem with the ps output? If so, can you post your ouput ps file? Regards, -JJ On Mon, Feb 8, 2010 at 3:26 PM, Tomasz Koziara <t.k...@ci...> wrote: > Dear Users/Developers > > I just installed version 0.99.1.1 since in my previous version (0.98) I had > problems with hatching. It seems though that the same problems persist in > the current version. The attached files reproduce the problem (a data file > and a python short script). Note that hatching is not present on all green > 'CONUPD' fields - but only on few of them. > > I will appreciate some hints on how to get by, > Regards > Tomek > > =================== > > > > > > > =================== > > dh178-192:tkp5 tomek$ python plots.py --verbose-helpful > $HOME=/Users/tomek > CONFIGDIR=/Users/tomek/.matplotlib > matplotlib data path /Library/Python/2.5/site-packages/matplotlib/mpl-data > loaded rc file > /Library/Python/2.5/site-packages/matplotlib/mpl-data/matplotlibrc > matplotlib version 0.99.1.1 > verbose.level helpful > interactive is False > units is False > platform is darwin > Using fontManager instance from /Users/tomek/.matplotlib/fontList.cache > backend MacOSX version unknown > findfont: Matching > :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium > to Bitstream Vera Sans > (/Library/Python/2.5/site-packages/matplotlib-0.98.6svn-py2.5-macosx-10.3-fat.egg/matplotlib/mpl-data/fonts/ttf/Vera.ttf) > with score of 0.000000 > findfont: Matching > :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=large > to Bitstream Vera Sans > (/Library/Python/2.5/site-packages/matplotlib-0.98.6svn-py2.5-macosx-10.3-fat.egg/matplotlib/mpl-data/fonts/ttf/Vera.ttf) > with score of 0.000000 > > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the > business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Stephan M. <zw...@we...> - 2010-02-09 15:20:54
|
I already had my destroy() method look like this:
def destroy(self):
self.f.clf()
Tix.Frame.destroy(self)
self.toolbar.destroy()
self.canvas._tkcanvas.destroy()
But it makes no difference.
Stephan
Am 08.02.2010 17:15, schrieb Michael Droettboom:
> Have you tried explicitly calling .clf() on the matplotlib Figure object from your Tix.Frame.destroy callback?
>
> Mike
>
>
|