SourceForge logo
SourceForge logo
Menu

matplotlib-devel — matplotlib developers

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
(1)
Nov
(33)
Dec
(20)
2004 Jan
(7)
Feb
(44)
Mar
(51)
Apr
(43)
May
(43)
Jun
(36)
Jul
(61)
Aug
(44)
Sep
(25)
Oct
(82)
Nov
(97)
Dec
(47)
2005 Jan
(77)
Feb
(143)
Mar
(42)
Apr
(31)
May
(93)
Jun
(93)
Jul
(35)
Aug
(78)
Sep
(56)
Oct
(44)
Nov
(72)
Dec
(75)
2006 Jan
(116)
Feb
(99)
Mar
(181)
Apr
(171)
May
(112)
Jun
(86)
Jul
(91)
Aug
(111)
Sep
(77)
Oct
(72)
Nov
(57)
Dec
(51)
2007 Jan
(64)
Feb
(116)
Mar
(70)
Apr
(74)
May
(53)
Jun
(40)
Jul
(519)
Aug
(151)
Sep
(132)
Oct
(74)
Nov
(282)
Dec
(190)
2008 Jan
(141)
Feb
(67)
Mar
(69)
Apr
(96)
May
(227)
Jun
(404)
Jul
(399)
Aug
(96)
Sep
(120)
Oct
(205)
Nov
(126)
Dec
(261)
2009 Jan
(136)
Feb
(136)
Mar
(119)
Apr
(124)
May
(155)
Jun
(98)
Jul
(136)
Aug
(292)
Sep
(174)
Oct
(126)
Nov
(126)
Dec
(79)
2010 Jan
(109)
Feb
(83)
Mar
(139)
Apr
(91)
May
(79)
Jun
(164)
Jul
(184)
Aug
(146)
Sep
(163)
Oct
(128)
Nov
(70)
Dec
(73)
2011 Jan
(235)
Feb
(165)
Mar
(147)
Apr
(86)
May
(74)
Jun
(118)
Jul
(65)
Aug
(75)
Sep
(162)
Oct
(94)
Nov
(48)
Dec
(44)
2012 Jan
(49)
Feb
(40)
Mar
(88)
Apr
(35)
May
(52)
Jun
(69)
Jul
(90)
Aug
(123)
Sep
(112)
Oct
(120)
Nov
(105)
Dec
(116)
2013 Jan
(76)
Feb
(26)
Mar
(78)
Apr
(43)
May
(61)
Jun
(53)
Jul
(147)
Aug
(85)
Sep
(83)
Oct
(122)
Nov
(18)
Dec
(27)
2014 Jan
(58)
Feb
(25)
Mar
(49)
Apr
(17)
May
(29)
Jun
(39)
Jul
(53)
Aug
(52)
Sep
(35)
Oct
(47)
Nov
(110)
Dec
(27)
2015 Jan
(50)
Feb
(93)
Mar
(96)
Apr
(30)
May
(55)
Jun
(83)
Jul
(44)
Aug
(8)
Sep
(5)
Oct
Nov
(1)
Dec
(1)
2016 Jan
Feb
Mar
(1)
Apr
May
Jun
(2)
Jul
Aug
(3)
Sep
(1)
Oct
(3)
Nov
Dec
2017 Jan
Feb
(5)
Mar
Apr
May
Jun
Jul
(3)
Aug
Sep
(7)
Oct
Nov
Dec
2018 Jan
Feb
Mar
Apr
May
Jun
Jul
(2)
Aug
Sep
Oct
Nov
Dec
S M T W T F S



1
(6)
2
(5)
3
4
5
6
(4)
7
(3)
8
9
(5)
10
11
12
(1)
13
14
15
(4)
16
(1)
17
(4)
18
(1)
19
(4)
20
(4)
21
(5)
22
(1)
23
(3)
24
(6)
25
(1)
26
(19)
27
(13)
28
(9)




Showing 6 results of 6

From: John H. <jdh...@ac...> - 2006年02月24日 20:06:55
>>>>> "David" == David TREMOUILLES <dav...@gm...> writes:
 >>> 2006年2月24日, David Huard <dav...@gm... >: What if I
 >>> want it to be non-interactive ? I want to save graphics
 >>> directly to a file from a script, without them being
 >>> displayed. It's weird that in this case close() crashes the
 >>> whole thing.
 David> Yes your wright the script have to work in non interactive
 David> mode. (I was just trying to give an explanation to Emmanuel
 David> problem). The following script should work (but it crashes
 David> like Emmanuel reported):
 David> #!/usr/bin/python import matplotlib import pylab #Turn off
 David> interactive mode matplotlib.interactive(False) #plot figure
 David> 1 pylab.figure() pylab.plot([1,2,3],[1,2,3])
 David> pylab.savefig("test_pylab1.png") pylab.close() #plot figure
 David> 2 pylab.figure() pylab.plot([1,2,3],[1,2,3])
 David> pylab.savefig("test_pylab2.png") pylab.close()
This is a bug and I fixed it in CVS (Steve take a look and see if you
agree with the show._mainloop approach) but basically you don't want
to use matplotlib this way.
If you do not want the figure to pop-up, that is you only want to
create a PNG and move on, just use the Agg backend rather than GTK*.
Eg
python myscript.py -dAgg
The problem you experienced arose because you closed all the figures
before you called show in non-interactive mode. For a GUI this makes
no sense, because you are telling the GUI to close all the windows
before it shows any of them. 
I fixed the GTK backend to not try and quit gtk before starting it :-)
In summary, I recommend:
 * in non-interactive mode with a GUI backend, always end your script
 with show. This starts the GUI mainloop. Do not close all your
 figures before you call show.
 * if you don't want an image to pop up, use non-interactive mode,
 and a non-GUI backend, and show is not required but it doesn't
 hurt either.
JDH
From: John H. <jdh...@ac...> - 2006年02月24日 19:57:27
There have been a lot of changes to the rc file of late, and I fear
these may be getting lost on users. It is not uncommon for me to see
someone launch mpl and get a host of rc warnings.
I think we should put these in API_CHANGES and announce them a little
more prominently in the release notes and on the user's list.
Cheers,
JDH
From: Eric F. <ef...@ha...> - 2006年02月24日 19:30:55
Jeff,
I am copying this to John and Charlie so they will know that all known 
imshow-related problems have been resolved (correct?). (Also to the 
devel list, just in case.) This and the previous message were not copied 
to either of the lists.
What is the difference between numpy.ma and the other masked array 
implementations that caused the exception? Is this something that 
should be fixed in numpy.ma?
Thanks.
Eric
Jeff Whitaker wrote:
> Andrew Jaffe wrote:
> 
>>
>>> Andrew: (val-vmin)/float(vmax-vmin) should be equivalent to the 
>>> original, since I believe vmin and vmax are always scalars.
>>>
>>> BTW: you can trigger the numpy.ma/imshow problem by uncommenting the 
>>> 'colorbar(im)' line in the image_masked.py example. With the original
>>>
>>> result = (1.0/(vmax-vmin))*(val-vmin)
>>> line in colors.py, it will throw an exception with numpy 0.9.5, but
>>>
>>> result = (val-vmin)/float(vmax-vmin)
>>>
>>> works.
>>>
>>> -Jeff
>>
>>
>> Jeff,
>>
>> Great -- thanks!
>>
>> Will you commit this change to CVS?
>>
>> Andrew
>>
> 
> Done.
> 
> -Jeff
> 
From: David H. <dav...@gm...> - 2006年02月24日 19:24:26
Hi,
What one can do is :
f =3D figure(1)
... some figure
f.clear()
f =3D figure(1)
... another figure
f.clear()
However, it is only a work around, not an actual solution...
Cheers,
David
2006年2月24日, David TREMOUILLES <dav...@gm...>:
>
> >>2006年2月24日, David Huard <dav...@gm... >:
> >>What if I want it to be non-interactive ? I want to save graphics
> >>directly to a file from a script, without them being displayed. It'=
s
> >>weird that in this case close() crashes the whole thing.
>
> Yes your wright the script have to work in non interactive mode. (I was
> just trying to give an explanation to Emmanuel problem).
> The following script should work (but it crashes like Emmanuel reported)=
:
>
> #!/usr/bin/python
> import matplotlib
> import pylab
> #Turn off interactive mode
> matplotlib.interactive(False)
> #plot figure 1
> pylab.figure()
> pylab.plot([1,2,3],[1,2,3])
> pylab.savefig("test_pylab1.png")
> pylab.close()
> #plot figure 2
> pylab.figure()
> pylab.plot([1,2,3],[1,2,3])
> pylab.savefig("test_pylab2.png")
> pylab.close()
>
> Second figure cannot be created due to the crash.
>
> We need the help of matplotlib Gurus !
>
> Regards,
>
> David
>
>
>
> 2006年2月24日, David Huard <dav...@gm...>:
> > What if I want it to be non-interactive ? I want to save graphics
> > directly to a file from a script, without them being displayed. It's
> > weird that in this case close() crashes the whole thing.
> >
> > David
> >
> > 2006年2月23日, David TREMOUILLES < dav...@gm...>:
> > > Could that be because interactive mode was set in your previous insta=
ll
> ?
> > > (in .matplotlibrc file)
> > > if I try:
> > >
> > > #!/usr/bin/python
> > > import matplotlib
> > > import pylab
> > > matplotlib.interactive(True)
> > > pylab.figure()
> > > pylab.close()
> > >
> > > Then it works...
> > > Hope this could help you...
> > >
> > > David
> > >
> > > 2006年2月23日, Emmanuel Pecontal <pec...@ob...>:
> > >
> > > > Hello,
> > > >
> > > > If I run the following script on my system (SuSE 10.0, matplotlib-0=
.87
> but
> > > > same behaviour with 0.86):
> > > >
> > > > #!/usr/bin/python
> > > >
> > > > import matplotlib
> > > > import pylab
> > > >
> > > > pylab.figure()
> > > > pylab.close ()
> > > >
> > > > It crashes with the following error message:
> > > >
> > > > Traceback (most recent call last):
> > > > File "./tmp.py", line 8, in ?
> > > > pylab.close()
> > > > File
> > > "/usr/lib/python2.4/site-packages/matplotlib/pylab.py",
> > > line 768, in
> > > > close
> > > > else: _pylab_helpers.Gcf.destroy(figManager.num)
> > > > File
> > >
> "/usr/lib/python2.4/site-packages/matplotlib/_pylab_helpers.py",
> > > line
> > > > 28, in destroy
> > > > figManager.destroy()
> > > > File
> > >
> "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py",
> > > > line 456, in destroy
> > > > gtk.main_quit()
> > > > RuntimeError: called outside of a mainloop
> > > >
> > > > Does someone has an idea of the problem?
> > > > I didn't have this kind of problem with my SuSE 9.3 and
> matplotlib-0.85
> > > >
> > > > --
> > > > Emmanuel P=E9contal
> > > >
> > > > CRAL - Observatoire de Lyon
> > > > 9, Av. Charles Andre
> > > > F-69561 Saint Genis Laval Cedex
> > > >
> > > > tel (33) (0)4.78.86.83.76 - fax (33) (0)4.78.86.83.86
> > > >
> > > > email : pec...@ob...
> > > >
> > >
> > >
> >
>
>
From: David T. <dav...@gm...> - 2006年02月24日 15:47:26
 >>2006年2月24日, David Huard <dav...@gm... >:
 >>What if I want it to be non-interactive ? I want to save graphics
 >>directly to a file from a script, without them being displayed. It's
 >>weird that in this case close() crashes the whole thing.
Yes your wright the script have to work in non interactive mode. (I was jus=
t
trying to give an explanation to Emmanuel problem).
The following script should work (but it crashes like Emmanuel reported):
#!/usr/bin/python
import matplotlib
import pylab
#Turn off interactive mode
matplotlib.interactive(False)
#plot figure 1
pylab.figure()
pylab.plot([1,2,3],[1,2,3])
pylab.savefig("test_pylab1.png")
pylab.close()
#plot figure 2
pylab.figure()
pylab.plot([1,2,3],[1,2,3])
pylab.savefig("test_pylab2.png")
pylab.close()
Second figure cannot be created due to the crash.
We need the help of matplotlib Gurus !
Regards,
David
2006年2月24日, David Huard <dav...@gm...>:
>
> What if I want it to be non-interactive ? I want to save graphics
> directly to a file from a script, without them being displayed. It's
> weird that in this case close() crashes the whole thing.
>
> David
>
> 2006年2月23日, David TREMOUILLES < dav...@gm...>:
> > Could that be because interactive mode was set in your previous install
> ?
> > (in .matplotlibrc file)
> > if I try:
> >
> > #!/usr/bin/python
> > import matplotlib
> > import pylab
> > matplotlib.interactive(True)
> > pylab.figure()
> > pylab.close()
> >
> > Then it works...
> > Hope this could help you...
> >
> > David
> >
> > 2006年2月23日, Emmanuel Pecontal <pec...@ob...>:
> >
> > > Hello,
> > >
> > > If I run the following script on my system (SuSE 10.0, matplotlib-0.8=
7but
> > > same behaviour with 0.86):
> > >
> > > #!/usr/bin/python
> > >
> > > import matplotlib
> > > import pylab
> > >
> > > pylab.figure()
> > > pylab.close ()
> > >
> > > It crashes with the following error message:
> > >
> > > Traceback (most recent call last):
> > > File "./tmp.py", line 8, in ?
> > > pylab.close()
> > > File
> > "/usr/lib/python2.4/site-packages/matplotlib/pylab.py",
> > line 768, in
> > > close
> > > else: _pylab_helpers.Gcf.destroy(figManager.num)
> > > File
> > "/usr/lib/python2.4/site-packages/matplotlib/_pylab_helpers.py",
> > line
> > > 28, in destroy
> > > figManager.destroy()
> > > File
> > "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py",
> > > line 456, in destroy
> > > gtk.main_quit()
> > > RuntimeError: called outside of a mainloop
> > >
> > > Does someone has an idea of the problem?
> > > I didn't have this kind of problem with my SuSE 9.3 and
> matplotlib-0.85
> > >
> > > --
> > > Emmanuel P=E9contal
> > >
> > > CRAL - Observatoire de Lyon
> > > 9, Av. Charles Andre
> > > F-69561 Saint Genis Laval Cedex
> > >
> > > tel (33) (0)4.78.86.83.76 - fax (33) (0)4.78.86.83.86
> > >
> > > email : pec...@ob...
> > >
> >
> >
>
From: Albert C. <mat...@ml...> - 2006年02月24日 06:15:32
On Wed, Feb 22, 2006 at 09:24:38PM -0600, Albert Chin wrote:
> 
> The failure occurs when displaying the data. I've also tried
> anim_tk.py to determine if it was a problem with the GTK+ backend but
> anim_tk.py fails in the same way.
I did some more digging and the "terminate called after throwing an
instance ..." error is coming from G++. Maybe something funk with C++
exceptions on HP/PA that isn't triggered on HP/IA.
-- 
albert chin (ch...@th...)

Showing 6 results of 6

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /