SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

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
(5)
2
(4)
3
4
(9)
5
(4)
6
(9)
7
(13)
8
(11)
9
(7)
10
(7)
11
(22)
12
(19)
13
(11)
14
(20)
15
(21)
16
(1)
17
(1)
18
(8)
19
(3)
20
(5)
21
(5)
22
(9)
23
(3)
24
(3)
25
(14)
26
(12)
27
(29)
28
(18)
29
(11)
30
(2)

Showing 7 results of 7

From: <and...@ti...> - 2005年04月10日 21:31:31
Hello NG,
 I found where the incompatibilities between Matplotlib and py2exe res=
ide,
at least on my configuration (Windows XP or 2000, Matplotlib 0.74 or 0.72=
pre,
wxPython 2.5.5.1 or previous). The following line in dates.py:
UTC =3D timezone('UTC') (line 94)
Breaks the executable with the error "Unknown timezone" or something simi=
lar.
Next, the way the Matplotlib developers are handling docstrings in pylab.=
py
(and others), like:
figimage.__doc__ =3D Figure.figimage.__doc__ + """
Addition kwargs: hold =3D [True|False] overrides default hold state"""
Breaks py2exe with an error like:
"Can not concatenate NoneType with str"
I just commented out these lines because I don't need docstrings in my ex=
ecutable,
but if someone has a better idea, I welcome all suggestions.
Thank you a lot.
Andrea.
From: <and...@ti...> - 2005年04月10日 20:36:13
Hello NGs,
>and...@ti... wrote:
>
>> On XP, I have Matplotlib 0.73 prerelease (that WAS a prerelease 1 mont=
hs
>> ago, nearly), while on Windows 2000 I have Matplotlib 0.74.
>> Well, I am using the WXAgg backend. By looking at backend_wx.py in 0.7=
3pre
>> (XP), I see that lines 116-117 are commented. These lines are:
>> 
>> # wxapp =3D wxPySimpleApp()
>> # wxapp.SetExitOnFrameDelete(True)
>> 
>Yes. Having two app objects can certainly cause problems, although I 
>wouldn't have expected it to manifest this way. Probably what is 
>happening is that when the spashscreen is closed it is being added to 
>the pending delete list but then the new app is being created and the 
>pending delete list is reinitialized and so the splash screen never gets=
>
>destroyed for real so the app's MainLoop keeps running waiting for it to=
>
>be destroyed.
>
>To find out for sure you could try uncommenting those lines on your XP
>box and see if you then have the same problem.
>
Ok Robin, I've done what you suggested: on my XP box I uncommented the 2
lines, and the application does NOT returns. So I found where the problem=
resides. It is not a wxPython nor a Windows issue, but a Matplotlib one.
Now I will probably leave them commented or I will add the Chris patch (c=
hecking
if a wx.App is already started or not). 
Finding this inconsistency in Matplotlib was a 2 weeks nightmare. 
Thanks for all your suggestions, NGs.
Andrea.
From: Werner F. B. <wer...@fr...> - 2005年04月10日 17:57:51
Hi All,
I figured this out, just doing something along these lines does the 
trick for me.
 self.figure.text(0.5, 0.95, title,
 horizontalalignment='center')
 self.figure.text(0.5, 0.92, 'sub title',
 horizontalalignment='center')
See you
Werner
Werner F. Bruhin wrote:
> The part about the sub-title got over looked, so I'll post again - 
> anyhow it was bad from me to stick two things into one message - sorry!
> 
> Is it possible to have sub-title lines, I saw that I can pass newline 
> with title string but this uses the same font attributes, I would like a 
> slightly smaller font and non bold etc for the second title line.
> 
> Thanks for any hints.
> Werner
> 
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
From: Werner F. B. <wer...@fr...> - 2005年04月10日 17:00:22
Hi Chris,
A small correction to the patch for backend_wx.py.
if wxPlatform == '__WXMSW__':
on line 638 or there abouts needs to be changed
See you
Werner
Werner F. Bruhin wrote:
> Hi Chris,
> 
> Attached are three patches to convert things to the new wx namespace. I 
> am very new to matplotlib, so it might be a good idea if someone with 
> more matplotlib and wxPython experience checks these out.
> 
> See you
> Werner
> 
> Chris Barker wrote:
> 
>>
>>>> (XP), I see that lines 116-117 are commented. These lines are:
>>>>
>>>> # wxapp = wxPySimpleApp()
>>>> # wxapp.SetExitOnFrameDelete(True)
>>
>>
>>
>> The wxApp should NOT be created here! However, if there seems to be a 
>> reason that it has to be, perhaps these lines could be surrounded by a 
>> check to see if there is already a wxApp running.
>>
>> Robin, is there a call to do that? Maybe:
>>
>> if not wxGetApp():
>> wxapp = wxPySimpleApp()
>> wxapp.SetExitOnFrameDelete(True)
>>
>> I just tested this quickly, and wxGetApp() returns None before app 
>> creation, and a wxApp instance after, which returns True, so it should 
>> work.
>>
>> For that matter, maybe wx.PySimpleApp() should check itself, and never 
>> create a duplicate app.
>>
>> By the way, it really should be:
>>
>> import wx
>>
>> wx.PySimpleApp()
>>
>> etc.
>>
>> Maybe I'll get around to cleaning up that code some day!
>>
>> -Chris
>>
>>
> 
From: Werner F. B. <wer...@fr...> - 2005年04月10日 09:08:33
Hi Chris,
Attached are three patches to convert things to the new wx namespace. I 
am very new to matplotlib, so it might be a good idea if someone with 
more matplotlib and wxPython experience checks these out.
See you
Werner
Chris Barker wrote:
> 
>>> (XP), I see that lines 116-117 are commented. These lines are:
>>>
>>> # wxapp = wxPySimpleApp()
>>> # wxapp.SetExitOnFrameDelete(True)
> 
> 
> The wxApp should NOT be created here! However, if there seems to be a 
> reason that it has to be, perhaps these lines could be surrounded by a 
> check to see if there is already a wxApp running.
> 
> Robin, is there a call to do that? Maybe:
> 
> if not wxGetApp():
> wxapp = wxPySimpleApp()
> wxapp.SetExitOnFrameDelete(True)
> 
> I just tested this quickly, and wxGetApp() returns None before app 
> creation, and a wxApp instance after, which returns True, so it should 
> work.
> 
> For that matter, maybe wx.PySimpleApp() should check itself, and never 
> create a duplicate app.
> 
> By the way, it really should be:
> 
> import wx
> 
> wx.PySimpleApp()
> 
> etc.
> 
> Maybe I'll get around to cleaning up that code some day!
> 
> -Chris
> 
> 
From: Chris B. <Chr...@no...> - 2005年04月10日 05:29:07
>> (XP), I see that lines 116-117 are commented. These lines are:
>>
>> # wxapp = wxPySimpleApp()
>> # wxapp.SetExitOnFrameDelete(True)
The wxApp should NOT be created here! However, if there seems to be a 
reason that it has to be, perhaps these lines could be surrounded by a 
check to see if there is already a wxApp running.
Robin, is there a call to do that? Maybe:
if not wxGetApp():
 wxapp = wxPySimpleApp()
 wxapp.SetExitOnFrameDelete(True)
I just tested this quickly, and wxGetApp() returns None before app 
creation, and a wxApp instance after, which returns True, so it should work.
For that matter, maybe wx.PySimpleApp() should check itself, and never 
create a duplicate app.
By the way, it really should be:
import wx
wx.PySimpleApp()
etc.
Maybe I'll get around to cleaning up that code some day!
-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer
 		
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
From: Matt N. <new...@ca...> - 2005年04月10日 04:14:27
Andrea,
> # wxapp =3D wxPySimpleApp()
> # wxapp.SetExitOnFrameDelete(True)
I commented out these lines in backend_wx.py and moved them into
the show() function so that a wxPySimpleApp was not created when
importing backend_wx.py. This was done to avoid the problem you
saw, reported by someone else (I never saw this problem -- it
seems to also to depend on wxPython version??). A few days
later, John put it back the way it was (create wxPySimpleApp in
the main portion of backend_wx.py). If I remember correctly,
this was because *not* having these lines in the main section of
backend_wx.py caused problems for some people using pylab.
I cannot explain or defend why wxapp=3DwxPySimpleApp() should be
run when importing backend_wx.py: it makes no sense to me. I
can't see why it's a problem to create a wxPySimpleApp() only as
a last resort, and only for interactive use. But I don't use
the pylab interface much, so maybe I'm missing something.
Sorry for the confusion. If you're not using the pylab
interface, just comment out these lines from backend_wx.py.
--Matt
On Sat, 9 Apr 2005 and...@ti... wrote:
> Hello NGs,
>=20
> I probably found where the problem resides. As it is a wxPython+Matp=
lotlib
> issue, I will send the mail to both newsgroups.
> The reason why my application does not terminates correctly on Windows =
2000
> while it terminates correctly on Windows XP does not depend on Windows =
version,
> but on Matplotlib. I am not 100% sure, because here I only have (at the
> moment) Windows XP, but I found a difference between 2 Matplotlib insta=
llations
> I have.
> On XP, I have Matplotlib 0.73 prerelease (that WAS a prerelease 1 month=
s
> ago, nearly), while on Windows 2000 I have Matplotlib 0.74.
> Well, I am using the WXAgg backend. By looking at backend_wx.py in 0.73=
pre
> (XP), I see that lines 116-117 are commented. These lines are:
>=20
> # wxapp =3D wxPySimpleApp()
> # wxapp.SetExitOnFrameDelete(True)
>=20
> While on Matplotlib 0.74 (2000) they are NOT commented. Well, in my app
> I don't need to initialize the wx.App() when calling plot/figure/Matplo=
tlib
> things, because my app has ALREADY initialized the wx.App().
> If I use Matplotlib (without wxPython) I will just add:
>=20
> import wx
> MyApp =3D wx.PySimpleApp()
>=20
> Before using any Matplotlib command.
> Is there a reason why these lines were commented on 0.73pre and now the=
y
> are not? Robin/John, could it be that the reason for which my applicati=
on
> does not return under Windows 2000?
>=20
> Thanks to you all.
>=20
> Andrea.
>=20
> >and...@ti... wrote:
> >> Hello NG,
> >>=20
> >> It's incredible... after having found that my application correc=
tly
> >> terminates if I add the line:
> >>=20
> >> self.MyTaskBarIcon.Destroy()
> >>=20
> >> on Windows XP, I am UNABLE to terminate it on Windows 2000. The main
> frame
> >> is correctly destroyed, together with its children, but there is sti=
ll
> >something
> >> alive that prevents Python to correctly finish and returning to me t=
he
> >control
> >> of the DOS console.
> >> The wxPython version is the same, the Python version is the same... =
the
> >> only differences between the 2 PC is the Windows version (XP=3Dwork,=
 2000=3Ddon't
> >> work) and the PC performances (XP=3D1GB RAM, 2000=3D528MB RAM).
> >> I used Spy++ and its friends and, after my app terminates, on 2000 t=
here
> >> is still a window opened. This window has no class information, no p=
articular
> >> ID, only a size and position elements. There is no reason why the ap=
plication
> >> behavior should be different.
> >> I don't even know which question I would formulate to you NG, it is =
a
> pain
> >> this continuous error-checking for a window/frame/panel that I didn'=
t
> create
> >> and that wxPython thinks is still alive (only on Windows 2000).
> >
> >If you can create a small sample that shows the problem I can run it=20
> >under the debugger to see if I can spot what's going on.
> >
> >--=20
> >Robin Dunn
> >Software Craftsman
> >http://wxPython.org Java give you jitters? Relax with wxPython!
>=20
>=20
>=20
>=20
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_ide95&alloc_id=14396&op=CCk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>=20

Showing 7 results of 7

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 によって変換されたページ (->オリジナル) /