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
|
From: John H. <jdh...@ac...> - 2005-04-11 14:45:40
|
OK, I spent some time looking at this morning and think I have a fix that works for matplotlib wx API users as well as pylab users. For the record, a little background. The module matplotlib.backends.backend_wx contains all the classes to enable matplotlib to be embedded in a wx application. There are two modes this module is used in: application developers who want to control the wx windows, panels, frames, etc, themselves, and pylab users who want a matlab like environment in which all the figure window, creation, etc, is managed for them. To support the latter, all the matplotlib GUI backends are required to define two functions new_figure_manager - creates a new wxFrame show - realizes/shows all frames Jeremy O'Donoghue, who wrote the wx backend, and latter Matt Newville who has been helping maintain it of late, tried putting the wxapp instantiation in the show function, but this caused a segfault on some platforms with some versions of wxpython (win32 with 2.4.x). We never figured out the root cause of this since often times the person developing/maintaining wx didn't have access to the buggy combination of platform + version. So we left wxapp creation at the module level which was ugly, hacky, and buggy, but at least it didn't seg fault. Today I spent some time tracking down where and why the segfault was occurring, and it was new_figure_manager -> FigureFrameWx -> wxPanel.__init__ The call to wxPanel.__init__ trigged the segfault. It appears the cause of this problem is that the wxapp must be created before the wxPanel is init'ed. The solution is to put the wxapp creation in new_figure_manager, not show, so that the app will be created before the wxpanel. This appears to work. Here is what I am currently doing wxapp = None # module level def new_figure_manager(num, *args, **kwargs): global wxapp if wxapp is None: wxapp = wx.PySimpleApp() wxapp.SetExitOnFrameDelete(True) ...snipsnip... def show(): ...snipsnip... if show._needmain and not matplotlib.is_interactive(): if wxapp is not None: wxapp.MainLoop() show._needmain = False And this seems to work for pylab and wx apps. Since apps will never call new_figure_manager or show, there should be no problem If there is a better / more elegant / more wxlike way to do this, let me know. Thanks, JDH |
From: <and...@ti...> - 2005-04-11 14:44:34
|
Hello Werner & NG, >I think the timezone stuff you can solve by putting "pytz" into the >packages to include. This is how my setup.py looks like: # incl are other includes includes =3D incl + ["pytz","pytz.zoneinfo"] excludes =3D ["Tkconstants", "Tkinter", "tcl", '_gtkagg', '_tkagg'] dll_excludes =3D ['libgdk-win32-2.0-0.dll', 'libgobject-2.0-0.dll'] setup( version =3D "1.0.0", description =3D "MyApp", name =3D "MyApp", data_files =3D [('matplotlibdata', glob.glob(r'c:\python23\share\matp= lotlib\*')), ('matplotlibdata', [r'c:\python23\share\matplotlib\.mat= plotlibrc'])], options =3D {"py2exe": {"compressed": 1, "optimize": 2, "includes": includes, "excludes": excludes, "dll_excludes": dll_excludes}}, windows =3D ["MyApp.py"] ) I still get the TimeZone error... >Isn't the optimize : 2 getting rid of the doc stuff? I didn't even imagine that the optimize option would interfere with the doc strings... is it a normal thing?!? Thanks to you all. Andrea. |
From: John H. <jdh...@ac...> - 2005-04-11 14:00:57
|
>>>>> "Werner" == Werner F Bruhin <wer...@fr...> writes: Werner> I still have a bit of a problem. This puts the legend Werner> "more or less" outside the plot. If I use "upper right" Werner> with only two lines it is o.k., however if I use Werner> e.g. "center right" then about half of the legend is still Werner> over the top of the plot. I think the best approach is to use fig.add_axes rather than fig.add_subplot to create your axes. Then you can make it the exact size you want. You can also place the figure legend anywhere you want by using loc=(x,y) instead of a location string. I just noticed this was undocumented :-(. It *is* documented for the axes legend, and I'll fix the figure legend docstring for the next release. Here's a little example import pylab as p fig = p.figure() ax = fig.add_axes([0.1, 0.3, 0.4, 0.4]) lines = ax.plot([1,2,3]) fig.legend(lines, ('hi', ), loc=(0.6, 0.6)) p.show() Hope this helps, JDH |
From: Werner F. B. <wer...@fr...> - 2005-04-11 13:39:23
|
Hi Andrea and others, I think the timezone stuff you can solve by putting "pytz" into the packages to include. Isn't the optimize : 2 getting rid of the doc stuff? # options for py2exe options = {"py2exe": {"compressed": 1, "optimize": 2, "packages": ["encodings", "kinterbasdb", "pytz"], "includes": ["ntpath"]} } I get an error about ntpath, that is why I put it to includes, but it doesn't solve the problem - posted it on the py2exe newsgroup. See you Werner and...@ti... wrote: > Hello NG, > > I found where the incompatibilities between Matplotlib and py2exe reside, > at least on my configuration (Windows XP or 2000, Matplotlib 0.74 or 0.72pre, > wxPython 2.5.5.1 or previous). The following line in dates.py: > > UTC = timezone('UTC') (line 94) > > Breaks the executable with the error "Unknown timezone" or something similar. > > Next, the way the Matplotlib developers are handling docstrings in pylab.py > (and others), like: > > figimage.__doc__ = Figure.figimage.__doc__ + """ > Addition kwargs: hold = [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 executable, > but if someone has a better idea, I welcome all suggestions. > > Thank you a lot. > > Andrea. > > > > > ------------------------------------------------------- > 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_id396&op=click |
From: Werner F. B. <wer...@fr...> - 2005-04-11 13:24:39
|
Hi Philipple, This might help your for the title. self.figure.text(0.5, 0.95, title, horizontalalignment='center') self.figure.text(0.5, 0.92, 'sub title', horizontalalignment='center') See you Werner Philippe COLLET wrote: > Hi everybody, > As i go through matplotlib tutorial and trying to test it, i didn't find > a way to customize the position of the title, the xlabel and the ylabel. > Is there a way to do it? > Are those elements of a figure placed in a standard way? > > Thanks for answers. > Philippe > > _________________________________________________________________ > MSN Messenger : personnalisez votre messagerie instantanée ! > http://g.msn.fr/FR1001/866 > > > > ------------------------------------------------------- > 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: Philippe C. <phi...@ho...> - 2005-04-11 13:03:44
|
Hi everybody, As i go through matplotlib tutorial and trying to test it, i didn't find a way to customize the position of the title, the xlabel and the ylabel. Is there a way to do it? Are those elements of a figure placed in a standard way? Thanks for answers. Philippe _________________________________________________________________ MSN Messenger : personnalisez votre messagerie instantanée ! http://g.msn.fr/FR1001/866 |
From: Michael T. <mic...@gm...> - 2005-04-11 12:17:44
|
Hi, I've had some fun building py2exe stuff with matplotlib too, see below for some comments and help. On Apr 10, 2005 10:31 PM, and...@ti... <and...@ti...> wrote: > Hello NG, > > I found where the incompatibilities between Matplotlib and py2exe reside, > at least on my configuration (Windows XP or 2000, Matplotlib 0.74 or 0.72pre, > wxPython 2.5.5.1 or previous). The following line in dates.py: > > UTC = timezone('UTC') (line 94) > > Breaks the executable with the error "Unknown timezone" or something similar. > I've encountered this one before, it's to do with the pytz module and py2exe's modulefinder. Basically pytz dynamically imports modules, so py2exe has some difficulty with it. For my pyexe I added the following to the includes list: "pytz", "pytz.zoneinfo", "pytz.zoneinfo.UTC", "pytz.zoneinfo.US", "pytz.zoneinfo.US.Eastern", "pytz.zoneinfo.US.Central", "pytz.zoneinfo.US.Mountain", "pytz.zoneinfo.US.Pacific", "pytz.zoneinfo.Europe.London", "pytz.zoneinfo.Europe.Paris", "pytz.zoneinfo.Europe.Berlin", "pytz.zoneinfo.Europe.Moscow", For me this seemed to cover all the timezones I encountered. > Next, the way the Matplotlib developers are handling docstrings in pylab.py > (and others), like: > > figimage.__doc__ = Figure.figimage.__doc__ + """ > Addition kwargs: hold = [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 executable, > but if someone has a better idea, I welcome all suggestions. > I've never seen this one before, it might be because I'm building with an older copy of matplotlib. For reference here is my complete set of matplotlib includes: "encodings", "encodings.ascii", "encodings.idna", "encodings.iso8859_1", "encodings.utf_8", "encodings.string_escape", "matplotlib", "matplotlib._na_image", "matplotlib._na_transforms", "matplotlib._nc_image", "matplotlib._nc_transforms", "matplotlib.ft2font", "matplotlib.backends", "matplotlib.backends._backend_agg", "matplotlib.backends._tkagg", "matplotlib.backends._gtkagg", "matplotlib.backends.backend_agg", "matplotlib.backends.backend_tkagg", "matplotlib.backends.backend_gtkagg", "matplotlib.numerix", "matplotlib.numerix.fft", "matplotlib.numerix.linear_algebra", "matplotlib.numerix.mlab", "matplotlib.numerix.random_array", "pytz", "pytz.zoneinfo", "pytz.zoneinfo.UTC", "pytz.zoneinfo.US", "pytz.zoneinfo.US.Eastern", "pytz.zoneinfo.US.Central", "pytz.zoneinfo.US.Mountain", "pytz.zoneinfo.US.Pacific", "pytz.zoneinfo.Europe.London", "pytz.zoneinfo.Europe.Paris", "pytz.zoneinfo.Europe.Berlin", "pytz.zoneinfo.Europe.Moscow", "numarray", "numarray.convolve._correlate", "numarray.convolve._lineshape", "numarray.fft.fftpack", "numarray.image._combine", "numarray.linear_algebra.lapack_lite2", "numarray.nd_image._nd_image", "numarray.random_array.ranlib2", "numarray._bytes", "numarray._chararray", "numarray._conv", "numarray._converter", "numarray._ndarray", "numarray._numarray", "numarray._objectarray", "numarray._operator", "numarray._sort", "numarray._ufunc", "numarray._ufuncBool", "numarray._ufuncComplex32", "numarray._ufuncComplex64", "numarray._ufuncFloat32", "numarray._ufuncFloat64", "numarray._ufuncInt16", "numarray._ufuncInt32", "numarray._ufuncInt64", "numarray._ufuncInt8", "numarray._ufuncUInt16", "numarray._ufuncUInt32", "numarray._ufuncUInt8", "numarray.libnumarray", "numarray.libnumeric", "numarray.memory", I don't use numeric so I can't comment on the includes there (I have a half hearted attempt, but I don't think it's complete). regards, Michael |
From: Sascha S. <sc...@te...> - 2005-04-11 11:30:52
|
Hi, I personally don't like the black edge around the marker symbols. Is ther= e an option like 'inherit' for the markeredgecolor to get it in the color= the line has? Thanks a lot! Sascha --=20 -------------------------------------------------------------------------= -- Sascha Schnepp Institut f=FCr Theorie Elektromagnetischer Felder (TEMF) TU Darms= tadt Fachbereich Elektrotechnik und Informationstechnik Schlo=DFgartenstra=DFe 8 / D 64289 Darmstadt phone: +49 (0)6151 1= 6-2261 mailto:sc...@te... fax: +49 (0)6151 16-46= 11 http://www.temf.de PGP-Key: 0xF660E207 (04/15/05) =BBWas zum Henker, Hauptmann! Was denkst Du? Willst Du diesen Herkules fo= rt- schicken? Sieht er nicht gerade so drein, als wollt er den Marschall von Sachsen mit einem R=FChrl=F6ffel =FCber den Ganges jagen?=AB -- Friedrich Schiller - "Die R=E4uber" -------------------------------------------------------------------------= -- |
From: Tim L. <ti...@cs...> - 2005-04-11 03:04:05
|
Hi all, I'm currently plotting 2 dimensional data sets using contourf and pcolor. I'd like to add on to these plots markers at the local maxima and minima. I can do this using scatter but the problem is finding the max/min in the first place. I'm currently using a brute force nested for loop which compares the value at each point with a square slice around it, but this is painfully slow (5 or 6 seconds for a 75x75 maxtrix). I was wondering if this is already implemented somewhere in matplotlib (or anywhere else for that matter) or if someone has come up against this problem before. Cheers, Tim Leslie PS. John, have you considered starting a #matplotlib channel on IRC at all? |
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 |
From: Robin D. <ro...@al...> - 2005-04-09 17:30:26
|
and...@ti... wrote: > On XP, I have Matplotlib 0.73 prerelease (that WAS a prerelease 1 months > 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.73pre > (XP), I see that lines 116-117 are commented. These lines are: > > # wxapp = wxPySimpleApp() > # wxapp.SetExitOnFrameDelete(True) > > 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/Matplotlib > things, because my app has ALREADY initialized the wx.App(). > If I use Matplotlib (without wxPython) I will just add: > > import wx > MyApp = wx.PySimpleApp() > > Before using any Matplotlib command. > Is there a reason why these lines were commented on 0.73pre and now they > are not? Robin/John, could it be that the reason for which my application > does not return under Windows 2000? 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. -- Robin Dunn Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython! |
From: Werner F. B. <wer...@fr...> - 2005-04-09 14:20:03
|
I still have a bit of a problem. This puts the legend "more or less" outside the plot. If I use "upper right" with only two lines it is o.k., however if I use e.g. "center right" then about half of the legend is still over the top of the plot. Also if I have more then 2 lines I start overlapping even when using "upper right". This is what I use (within the wxcursor_demo.py). self.figure.legend((pLine, cLine), ('Purchase', 'Consumption'), 'upper right') I would like the legend being totally outside the plot, I am o.k. with that the overall canvas would have to be a bit larger. Is there a way I can do this? BTW, I tried using "axespad = 0.02" with different values, i.e. "-0.15" puts it to the right, but half the legend isn't visable anymore. Thanks and best regards Werner Werner F. Bruhin wrote: > Hi John and Chris, > > John Hunter wrote: > >>>>>>> "Chris" == Chris Barker >>>>>>> <Chr...@no...> writes: >> >> >> >> Chris> By the way, I'm on a quest to make the OO interface to >> Chris> matplotlib fully functional and convenient. If you want to >> Chris> work on it, John would probably except a patch to make a >> Chris> figure.legend() method. >> >> pylab.figlegend is a thin wrapper to matplotlib.Figure.legend; see >> http://matplotlib.sf.net/matplotlib.figure.html#Figure-legend > > > Got it, also don't understand why I could not get this to work yesterday > - probably had crossed eyes. > > Thanks and best regards > Werner > >> >> <wink> >> >> JDH >> >> >> ------------------------------------------------------- >> 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 > > > > > ------------------------------------------------------- > 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: <and...@ti...> - 2005-04-09 13:35:54
|
Hello NGs, I probably found where the problem resides. As it is a wxPython+Matplo= tlib issue, I will send the mail to both newsgroups. The reason why my application does not terminates correctly on Windows 20= 00 while it terminates correctly on Windows XP does not depend on Windows ve= rsion, 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 install= ations I have. On XP, I have Matplotlib 0.73 prerelease (that WAS a prerelease 1 months 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.73pr= e (XP), I see that lines 116-117 are commented. These lines are: # wxapp =3D wxPySimpleApp() # wxapp.SetExitOnFrameDelete(True) 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/Matplotl= ib things, because my app has ALREADY initialized the wx.App(). If I use Matplotlib (without wxPython) I will just add: import wx MyApp =3D wx.PySimpleApp() Before using any Matplotlib command. Is there a reason why these lines were commented on 0.73pre and now they are not? Robin/John, could it be that the reason for which my application= does not return under Windows 2000? Thanks to you all. Andrea. >and...@ti... wrote: >> Hello NG, >> >> It's incredible... after having found that my application correctl= y >> terminates if I add the line: >> >> self.MyTaskBarIcon.Destroy() >> >> 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 still= >something >> alive that prevents Python to correctly finish and returning to me the= >control >> of the DOS console. >> The wxPython version is the same, the Python version is the same... th= e >> only differences between the 2 PC is the Windows version (XP=3Dwork, 2= 000=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 the= re >> is still a window opened. This window has no class information, no par= ticular >> ID, only a size and position elements. There is no reason why the appl= ication >> 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 >under the debugger to see if I can spot what's going on. > >-- >Robin Dunn >Software Craftsman >http://wxPython.org Java give you jitters? Relax with wxPython! |
From: Werner F. B. <wer...@fr...> - 2005-04-09 13:03:38
|
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 |
From: Werner F. B. <wer...@fr...> - 2005-04-09 12:54:56
|
Hi John and Chris, John Hunter wrote: >>>>>>"Chris" == Chris Barker <Chr...@no...> writes: > > > Chris> By the way, I'm on a quest to make the OO interface to > Chris> matplotlib fully functional and convenient. If you want to > Chris> work on it, John would probably except a patch to make a > Chris> figure.legend() method. > > pylab.figlegend is a thin wrapper to matplotlib.Figure.legend; see > http://matplotlib.sf.net/matplotlib.figure.html#Figure-legend Got it, also don't understand why I could not get this to work yesterday - probably had crossed eyes. Thanks and best regards Werner > > <wink> > > JDH > > > ------------------------------------------------------- > 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: John H. <jdh...@ac...> - 2005-04-09 11:59:31
|
>>>>> "Brian" == Brian B <b-m...@bb...> writes: Brian> Hello, I have generated an image with savefig(..., Brian> dpi=100). I do not use a main title for the graph (not the Brian> same as the X- and Y- axis labels). When I display the Brian> image on an HTML page, there is a space of approximately 60 Brian> pixels above the image that contain no graph drawing, I Brian> assume this space was reserved for a title that I have no Brian> need for. The white space of 60 pixels on top creates too Brian> much gap between the image and another HTML page element Brian> above. Hi Brian, The Axes is the white space that contains the lines, rectangles, text etc. The Figure is the whole canvas that contains the Axes. The default Axes is created by Subplot(111) which leaves empty space at the left, bottom, top, right and bottom. You can create your own Axes dimensions. with the "axes" command http://matplotlib.sf.net/matplotlib.pylab.html#-axes Eg, to leave no room at right or top, use ax = axes([0.1, 0.1, 0.9, 0.9]) The arguments to the axes function are left, bottom, width and height, expressed as fractions of the figure width and height. 0,0 is bottom, left and 1,1 is top, right. So the lower left corner of this axes is 0.1, 0.1 and the upper right is 0.1+0.9, 0.1+0.9 or 1,1 which is the upper right of the figure (no white space). You may also want to customize the background color of the Axes and Figure to be the same -- see help for axes, figure and savefig (hint, although the figure has a background color, savefig overrides it because sometimes you want a different figure background when working interactively and saving). See also examples/axes_demo.py. JDH |
From: Brian B. <b-m...@bb...> - 2005-04-09 06:06:34
|
Hello, I have generated an image with savefig(..., dpi=100). I do not use a main title for the graph (not the same as the X- and Y- axis labels). When I display the image on an HTML page, there is a space of approximately 60 pixels above the image that contain no graph drawing, I assume this space was reserved for a title that I have no need for. The white space of 60 pixels on top creates too much gap between the image and another HTML page element above. I'm generating the figure dynamically so I can't manually crop out the white space above the top graph border. Is there any way to reduce whitespace above the graph to be reasonably trimmed down when not using a graph title? Thanks! Brian |
From: John H. <jdh...@ac...> - 2005-04-08 19:03:28
|
>>>>> "Rick" == Rick Muller <rm...@sa...> writes: Rick> I find the following definitions really useful: def Rick> xmin(val): a = axis() a[0]=val axis(a) return Rick> def xmax(val): a = axis() a[1]=val axis(a) return Rick> def ymin(val): a = axis() a[2]=val axis(a) return Rick> def ymax(val): a = axis() a[3]=val axis(a) return I'm not real keen on adding four new names to the pylab interface for such a small convenience. This has nothing to do with matlab compatibility, but just to try and limit the number of different functions that mostly do the same thing. Already we have axis, xlim, ylim, and ax.set_xlim, etc. Adding more different functions to set the limits is a recipe for complexity and confusion. I think there is a solution for you though by extending the functions already in place, which would entail just a little more typing. One possibility would be to allow kwargs to axis or xlim/ylim, so that you could do axis(xmin=2) and it would just update the xmin while keeping all other args the same. Alternatively, that interface could be expose in xlim/ylim xlim(xmin=2) What do you think? JDH |
From: Rick M. <rm...@sa...> - 2005-04-08 18:52:35
|
I find the following definitions really useful: def xmin(val): a = axis() a[0]=val axis(a) return def xmax(val): a = axis() a[1]=val axis(a) return def ymin(val): a = axis() a[2]=val axis(a) return def ymax(val): a = axis() a[3]=val axis(a) return I realize that part of the reason behind the pylab api is to mimic what is in matlab. But is there any reason why functions such as these couldn't be added? Rick Muller - rm...@sa... - http://www.cs.sandia.gov/~rmuller Computational Materials and Molecular Biology Sandia National Laboratories PO Box 5800, M/S 1110 Albuquerque, NM 87185-1110 |