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: Philipp W. <ma...@ph...> - 2004-08-10 06:33:21
|
> On Mon, 2004-08-09 at 15:19, John Hunter wrote: >> Probably what Philipp is looking for is for fill_over to do some >> linear interpolation between his data points, which I think gives the >> least surprising results. The attached code probably comes closer to >> what he's looking for. > > John, you're quite right in your deduction. For some reason I wasn't > seeing exactly the behavior Philipp reported, although it was enough > different from your result that I agree your code is closer to what is > required. His example code and yours give somewhat different results > when used with the fill_over function on the matplotlib Web site. > > Boy, Python is fun...and I'm learning to like matplotlib a lot too. > > Steve > > > Good Morning and thank you for your help. With the new function code, the filling works really great. Thank you ! Philipp Weißmann |
From: Stephen W. <ste...@cs...> - 2004-08-10 04:27:15
|
On Mon, 2004-08-09 at 15:19, John Hunter wrote: > Probably what Philipp is looking for is for fill_over to do some > linear interpolation between his data points, which I think gives the > least surprising results. The attached code probably comes closer to > what he's looking for. John, you're quite right in your deduction. For some reason I wasn't seeing exactly the behavior Philipp reported, although it was enough different from your result that I agree your code is closer to what is required. His example code and yours give somewhat different results when used with the fill_over function on the matplotlib Web site. Boy, Python is fun...and I'm learning to like matplotlib a lot too. Steve |
From: Steve C. <ste...@ya...> - 2004-08-10 02:32:06
|
On Tue, 2004-08-10 at 00:55, John Hunter wrote: > Also, Steve, we might be better off here catching *all* exceptions > rather than just the gobject error. Darren, would you test to see if > this works > > > # set icon used when windows are minimized > if gtk.pygtk_version >= (2,2,0): > basedir = matplotlib.rcParams['datapath'] > fname = os.path.join(basedir, 'matplotlib.svg') > try: gtk.window_set_default_icon_from_file (fname) > except: print >>sys.stderr, 'Could not load matplotlib icon' I've changed this code section of backend_gtk.py in cvs so it catches all exceptions, prints a warning and continues running, rather than aborting on unknown exceptions. Steve |
From: Darren D. <dd...@co...> - 2004-08-10 02:02:07
|
I was thinking about the way the labels are formatted. Some of the numbers I work with are large(10^10) and small (10^-10), and the formatting wasnt quite right. I am running the following as a test: mport matplotlib from matplotlib.matlab import * from numarray import array a=array(range(10))*1e6+1e7 b = array(range(10))*1e-5+1e-4 plot(a,b) in ticker.py, in ScalarFormatter, what is the purpose of this routine? # if the value is just a fraction off an int, use the int if abs(x-long(x))<0.0001*d: if x<=10000: return '%d' % long(x + 0.5) else: return '%1.0e'%long(x) If commented out, the labels are formatted appropriately as exponentials, otherwise, the level of precision can often not be useful. Also, in the exponential formatting block, might this if d < 1e-3: fmt = '%1.3f' read this?: if d < 1e-2: fmt = '%1.3e' One final suggestion, for formatting the exponential component: m = self._zerorgx.match(s) if m: s = m.group(1) if m.group(2) is not None: ## s += m.group(2) s += m.group(2)[:2]+str(int(m.group(2)[2:])) ## my hack to make 3e003 look like 3e3. (Whats the "right way"?) s = s.replace('+', '') return s Darren |
From: John H. <jdh...@ac...> - 2004-08-09 22:43:36
|
>>>>> "Stephen" == Stephen Walton <ste...@cs...> writes: Stephen> It looks to me, when running your code, that fill_over is Stephen> doing the right thing: filling everything between 0.5 and Stephen> your plotted line with a color. It is just that with Stephen> your coarse spacing, you don't have points at every Stephen> multiple of pi/2. However, this is with the current CVS Stephen> version, so you may have a problem with 0.60.2. Probably what Philipp is looking for is for fill_over to do some linear interpolation between his data points, which I think gives the least surprising results. The attached code probably comes closer to what he's looking for. It's probably a useful function to include in the library - see if it meets your needs from matplotlib.matlab import * def fill_over(ax, x, y, val, color, over=True): """ Plot filled x,y for all y over val If over = False, fill under """ x = asarray(x).astype(nx.Float32) y = asarray(y).astype(nx.Float32) ybase = asarray(y)-val crossings = nonzero(less(ybase[:-1] * ybase[1:],0)) on = not over indLast = 0 for ind in crossings: if not on: on = not on indLast = ind continue thisX = array(x[indLast:ind+2]) thisY = array(y[indLast:ind+2]) #find the x point between x[0] and x[1] on the line #connecting them such that f(x) = 0.5 #if len(thisX)<3: continue m = (thisY[1]-thisY[0])/(thisX[1]-thisX[0]) x0 = (val-thisY[0])/m+thisX[0] thisX[0] = x0 thisY[0] = val # now get the last point on the interpolated line m = (thisY[-1]-thisY[-2])/(thisX[-1]-thisX[-2]) xend = (val-thisY[-2])/m+thisX[-2] thisX[-1] = xend thisY[-1] = val on = not on ax.fill(thisX, thisY, color) indLast = ind x=arange(0.0, 20.0, 1.0) y = sin(x) plot(x,y, 'ro-') fill_over(gca(), x, y, 0.5, '#0000FF', over=True) show() |
From: Stephen W. <ste...@cs...> - 2004-08-09 21:26:53
|
On Mon, 2004-08-09 at 13:44, Philipp Weissmann wrote: > when using fill_over, it does not draw exactly at one line but with a=20 > slightly aberration. This especially is horrible when using a low=20 > resolution: It looks to me, when running your code, that fill_over is doing the right thing: filling everything between 0.5 and your plotted line with a color. It is just that with your coarse spacing, you don't have points at every multiple of pi/2. However, this is with the current CVS version, so you may have a problem with 0.60.2. Is fill_over supported in any way? I had a problem finding it, and it looks like it is in the category of unsupported contribted code. By the way, Herr Weissman, setting up your sample data can be done simply by typing x=3Darange(0,20) y=3Dsin(x) without 'x=3D[]', 'y=3D[]', or the for loop. --=20 Stephen Walton <ste...@cs...> Dept. of Physics & Astronomy, Cal State Northridge |
From: Darren D. <dd...@co...> - 2004-08-09 20:52:31
|
> Darren> After upgrading to Matplotlib 0.61, I am getting the > Darren> following error: Unable to load image-loading module: > Darren> C:\Program Files\Common > Darren> Files\GTK\2.0/lib/gtk-2.0/2.2.0/loaders/svg_loader.dll > > Darren> The path is correct, the file exists, I wonder if the > Darren> mixed path seperators is causing trouble? I cant find the > Darren> location of this exception in matplotlib to look into it, > Darren> where should I look? > > I'm note getting this error. My guess is that it is coming from the > final lines of backend_gtk.py > > # set icon used when windows are minimized > if gtk.pygtk_version >= (2,2,0): > basedir = matplotlib.rcParams['datapath'] > fname = os.path.join(basedir, 'matplotlib.svg') > try: gtk.window_set_default_icon_from_file (fname) > except gobject.GError, exc: print >>sys.stderr, exc > > My win32 pygtk is older than 2.2.0 which may be why I am not seeing it. > Would you mind seeing if this is indeed the problem (for starters, > just replace the conditional with 'if 0:'. If you get any more > insight into the problem, be sure and let me know! > > Also, Steve, we might be better off here catching *all* exceptions > rather than just the gobject error. Darren, would you test to see if > this works > > > # set icon used when windows are minimized > if gtk.pygtk_version >= (2,2,0): > basedir = matplotlib.rcParams['datapath'] > fname = os.path.join(basedir, 'matplotlib.svg') > try: gtk.window_set_default_icon_from_file (fname) > except: print >>sys.stderr, 'Could not load matplotlib icon' > > I tried this, and then started getting popups about dll's not being found. svg_loader.dll was not the problem. The following were missing from Common Files\GTK\2.0\bin: librsvg-2-2.dll libart_lgpl_2-2.dll libgsf-1-1.dll libxml2.dll zlib.dll I had copies of all of these in my Gimp/bin directory, with the exception of zlib. At some point, months ago, I had downloaded zipfiles of all of these dll's, including zlib121 (not sure what I downloaded them for, probably the Gimp). Unzipped, zlib121 is called zlib1.dll, I renamed it zlib.dll and saved it with the other missing dll's in the GTK\2.0\bin. After resolving a dll clash (existing but incompatible zlib.dll in windows/system32), I think it is working. By the way, the new toolbar is NICE. I like that Matplotlib is branding its windows, too, but what happened to the cardiogram? Matplotlib is too cool for a sin function, maybe the Strange Attractor is more appropriate? (Seems like something a Mac programmer would try.) Darren |
From: Barry D. <bl...@ad...> - 2004-08-09 20:46:38
|
John, Clean install worked. Must have had some version leftovers around. Thanks. Barry --- John Hunter wrote: > >>>>> "Barry" == Barry Drake <> > writes: > > Barry> This means that it gets past the > try-except in > Barry> backend_wx.py, but can't find > wxPySimpleApp. > > Are you using the standard python shell or an IDE > like pycrust? If > the latter, it may be overriding the sys,exit which > is why you aren't > seeing it. From your previous post, it looks like > your wx > installation is in bad shape. Until you can do > 'from wxPython.wx > import *' from the standard python shell, I wouldn't > bother with > trying to tweak matplotlib. > > I didn't see any error message like the one you were > getting in the > wxpython archives - you might try the wx mailing > list. > > JDH > > > ------------------------------------------------------- > This SF.Net email is sponsored by OSTG. Have you > noticed the changes on > Linux.com, ITManagersJournal and NewsForge in the > past few weeks? Now, > one more big change to announce. We are now OSTG- > Open Source Technology > Group. Come see the changes on the new OSTG site. > www.ostg.com > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Philipp W. <ma...@ph...> - 2004-08-09 20:46:38
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hallo matplitlib userse, when using fill_over, it does not draw exactly at one line but with a slightly aberration. This especially is horrible when using a low resolution: The following program draws a nice sinus-curve and fills all values above 0.5. But when reducing the resolution (i.e. set the variable res to "1") fill_over generates weird fillings. from matplotlib.matlab import * from matplotlib.helpers import * res=0.1 # < 0.1 -> nice resolution # > 1 -> weird fillings x=[] y=[] x=arange(0,20,res) for i in x: y.append(sin(i)) r=axes() r.plot(x,y); fill_over(r,x,y, 0.5, '#0000FF',over=True) show() -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) iD8DBQFBF+JHQz7EsHuNmkoRAg86AJkBLwXFD+ShYKh/k9p7ZnRLbJQarACghr7U 3fjj7ejBOl/XxB854CgfYD0= =zPc3 -----END PGP SIGNATURE----- |
From: John H. <jdh...@ac...> - 2004-08-09 20:31:09
|
What's new in matplotlib-0.61.0 - Note win32 pygtk users - if you encounter problems or errors related to svg loading, see note at end of this email. You can read these announce notes in html with hyperlinks at http://matplotlib.sf.net/whats_new.html. * A new, enhanced, navigation toolbar. Set 'toolbar : toolbar2' in matplotlibrc to try it out. Tutorial on the new toolbar is at http://matplotlib.sf.net/tutorial.html#toolbar2. Note that this toolbar behaves very differently than the classic toolbar. To use it, you must click on the pan/zoom or zoom to rect and then interact with the axes by dragging your mouse over it. The 'forward', 'back' and 'home' buttons are used to navigate between previously defined view limits. At some point we'll add multiple simultaneous axes support for the new toolbar but we're still mulling over the interface - if you need it you can still uses toolbar : classic. * Mathtext for PS!!! Also, PS now embeds TrueType fonts so the same fonts you use in the *Agg GUIs should be displayed in PS output. Thanks Paul Barrett! * The imread function is used to load PNGs into arrays. I'd like to add more image loaders and savers down the road - http://matplotlib.sourceforge.net/matplotlib.matlab.html#-imread * New event handling. The functions mpl_connect and mpl_disconnect are used for backend independent event handling. The callback signature is func(event). See http://matplotlib.sf.net/tutorial.html#events and http://matplotlib.sf.net/examples/coords_demo.py. The new events carry lots of useful information in them, like the coords in display and data units, the axes instance they were over, keys pressed during the event and more. * Many fixes to the SVG backend, including page layout, font support and image support. SVG is now considered alpha. You can save ps/eps/svg figures from GUI backends by providing the right extensions. SVG is currently the fastest backend in my tests. * More memory leaks fixed - see http://matplotlib.sourceforge.net/faq.html#LEAKS for details. My estimate is that complex figures (multiple subplots, images, etc..) now leak no more than 10-50 bytes per figure. Down from several hundred bytes per figure in 0.60. * Vertical mathtext in backend_agg (ylabels now work properly!). mathtext with arbitrary rotations in PS. Thanks Jim Benson and Paul Barrett! * Added some abbrev functions in matplotlib.lines, mainly for interactive users trying to save key strokes. markerfacecolor is a lot of keys! For lines, these abbrevs were added aa : antialiased c : color ls : linestyle lw : linewidth mec : markeredgecolor mew : markeredgewidth mfc : markerfacecolor ms : markersize Thus you can type --not necessarily recommended for readability in scripts or apps but great for throwaway use in interactive shells # no antialiasing, thick green markeredge lines >>> plot(range(10), 'ro', aa=False, mew=2, mec='g') Analogs in matplotlib.patches aa : antialiased lw : linewidth ec : edgecolor fc : facecolor * You can put a .matplotlibrc file in a dir to override the one in your HOME dir. If you have a project, say a book, and you want to make a bunch of images with the same look and feel for the book, you can place a custom rc file in the code dir for that book and this won't affect the configs you use for normal, interactive use. * Updated installing instructions at http://matplotlib.sf.net/installing.html (see also INSTALL in src distro). Fixed a tk/osx install problem in setupext.py * New demo for wx/wxagg showing how to to make a flicker free cursor that follows the mouse and reports the coords in a status bar - see http://matplotlib.sf.net/examples/wxcursor_demo.py * Numerous bug fixes and minor enhancements detailed at http://matplotlib.sf.net/CHANGELOG Downloads at http://sourceforge.net/projects/matplotlib pygtk / win32 bug Alas, an enterprising matplotlib user found a bug in matplotlib-0.61 on win32 with recent versions of pygtk even before the announcement. Sigh. Is it just me or is testing multiple GUIs with multiple, incompatible versions on multiple platforms a pain? Apparently this bug is only exposed on recent versions of pygtk for win32. If you encounter problems, try removing or commenting out the last lines of site-packages\matplotlib\backends\backend_gtk.py which set the matplotlib minimization icon. Eg, triple quote """ # set icon used when windows are minimized if gtk.pygtk_version >= (2,2,0): basedir = matplotlib.rcParams['datapath'] fname = os.path.join(basedir, 'matplotlib.svg') try: gtk.window_set_default_icon_from_file (fname) except gobject.GError, exc: print >>sys.stderr, exc """ |
From: Barry D. <bl...@ad...> - 2004-08-09 20:24:58
|
John, I'm using a windows XP shell; so no extra stuff running. I did run all of the wxPython 2.5 demos before trying my old matplotlib code. The wxPython demos ran fine. My "old" matplotlib code ran under matplotlib 0.54.2 with wxPython 2.4.1.2; I tested all of the backends with success. After upgrading to wxPython 2.5 all of my matplotlib code is broken. I even upgraded to the latest matplotlib, 0.61. Still doesn't work. I'll try a clean reinstall next. If that doesn't work I'll go to the wx lists. Thanks. Barry --- John Hunter wrote: > >>>>> "Barry" == Barry Drake <> > writes: > > Barry> This means that it gets past the > try-except in > Barry> backend_wx.py, but can't find > wxPySimpleApp. > > Are you using the standard python shell or an IDE > like pycrust? If > the latter, it may be overriding the sys,exit which > is why you aren't > seeing it. From your previous post, it looks like > your wx > installation is in bad shape. Until you can do > 'from wxPython.wx > import *' from the standard python shell, I wouldn't > bother with > trying to tweak matplotlib. > > I didn't see any error message like the one you were > getting in the > wxpython archives - you might try the wx mailing > list. > > JDH > > > ------------------------------------------------------- > This SF.Net email is sponsored by OSTG. Have you > noticed the changes on > Linux.com, ITManagersJournal and NewsForge in the > past few weeks? Now, > one more big change to announce. We are now OSTG- > Open Source Technology > Group. Come see the changes on the new OSTG site. > www.ostg.com > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: John H. <jdh...@ac...> - 2004-08-09 20:16:55
|
>>>>> "Jin-chung" == Jin-chung Hsu <hs...@st...> writes: Jin-chung> One would expect the following will fill up the plot Jin-chung> window: >>>> n=zeros(20000) n[::2]=1 plot(n) Jin-chung> The plot "stops" a little more than half way, as if it Jin-chung> "runs out of ink". Jin-chung> It happens on Linux as well as Solaris, using either Jin-chung> numarray and Numeric, and both TkAgg and GTKAgg, but Jin-chung> not GTK. Is this due to some AGG limitation? A bit more information on this problem - I just got this post from Maxim on the Agg mailing list Hi John, You have this wierdness because your path is too long, it exceeds the maximal limit of memory allowed for the scanline rasterizer. It's 4196*1024 cells (pixels), or 67MB. I added this limit in order not to crash the whole system in case if you or I have an infinite loop of rasterizer::line_to. I'm not sure if it's the best solution, but I don't see anything better. What is the necessity to draw such long uninterrupted paths? McSeem This explains several of the "strange observations". The problem occured when the axes limits were [-1,1] and not [-2,2] because in the latter case the pixel coverage was smaller. It occured for plotting solid lines but not for circles for the same reason. Probably the best solution is to break long line paths into multiple paths in the agg backend. It should be a pretty rare event - there aren't too many plots that try and cover that many pixels with lines, but it does happen and should be accounted for... JDH |
From: John H. <jdh...@ac...> - 2004-08-09 20:11:22
|
>>>>> "Jin-chung" == Jin-chung Hsu <hs...@st...> writes: Jin-chung> Hi: I have encountered several problems with plot_date. Jin-chung> I am using 0.60.1 (maybe fixed in 0.60.2?) on Solaris. Jin-chung> (1) If I put a smaller number as one of the dates (as Jin-chung> seconds), it raises the "before the epoch" error. But Jin-chung> I think plot_date should accomodate dates earlier than Jin-chung> 1970. Yes, this is on the goals page - when I implemented the dates module, I wanted to be able to support python2.2, and thus fell back on the time module which is based on the epoch. It's a limitation that needs to be addressed. On possibility is to require python2.3 for datetime support - probably better is to use datetime and an earlier epoch where available. Jin-chung> (2) After the error in (1) happens, even if I put Jin-chung> "legal" dates and run plot_date again, it still issues Jin-chung> the same error. It seems there is some kind of switch Jin-chung> needs to be reset. Does cla() help - normally all plot data is kept around until the axes are cleared. This happens by default is axes.hold is False in rc or if you manually set >>> hold(False) If you still have the problem after the axes are cleared, let me know because then it's a bug. Jin-chung> (3) if, e.g. t=[1.e8, 1.1e8], the x-axis tick labels Jin-chung> are crowded. This appears to be fixed in 0.61 with Peter Groszkowski MultiWeekLocator submission. Thanks, JDH |
From: Jin-chung H. <hs...@st...> - 2004-08-09 18:56:38
|
Hi: I have encountered several problems with plot_date. I am using 0.60.1 (maybe fixed in 0.60.2?) on Solaris. (1) If I put a smaller number as one of the dates (as seconds), it raises the "before the epoch" error. But I think plot_date should accomodate dates earlier than 1970. >>> t=[1.e7, 1.e8] >>> plot_date(t,y,None) Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/ra/pysoft/2.3.3/matplotlib/matlab.py", line 1207, in plot_date try: lines = gca().plot_date(*args, **kwargs) File "/usr/ra/pysoft/2.3.3/matplotlib/axes.py", line 1496, in plot_date ret = self.plot(e, y, fmt, **kwargs) File "/usr/ra/pysoft/2.3.3/matplotlib/axes.py", line 1472, in plot self.autoscale_view() File "/usr/ra/pysoft/2.3.3/matplotlib/axes.py", line 445, in autoscale_view tup = locator.autoscale() File "/usr/ra/pysoft/2.3.3/matplotlib/ticker.py", line 728, in autoscale dmin = self.epochConverter.floor_month(dmin) File "/usr/ra/pysoft/2.3.3/matplotlib/dates.py", line 354, in floor_month if y<1970: raise RuntimeError('You are before the epoch!') RuntimeError: You are before the epoch! (2) After the error in (1) happens, even if I put "legal" dates and run plot_date again, it still issues the same error. It seems there is some kind of switch needs to be reset. (3) if, e.g. t=[1.e8, 1.1e8], the x-axis tick labels are crowded. JC Hsu |
From: John H. <jdh...@ac...> - 2004-08-09 18:39:00
|
>>>>> "Barry" == Barry Drake <bl...@ad...> writes: Barry> This means that it gets past the try-except in Barry> backend_wx.py, but can't find wxPySimpleApp. Are you using the standard python shell or an IDE like pycrust? If the latter, it may be overriding the sys,exit which is why you aren't seeing it. From your previous post, it looks like your wx installation is in bad shape. Until you can do 'from wxPython.wx import *' from the standard python shell, I wouldn't bother with trying to tweak matplotlib. I didn't see any error message like the one you were getting in the wxpython archives - you might try the wx mailing list. JDH |
From: Barry D. <bl...@ad...> - 2004-08-09 18:07:23
|
Update to my previous post: When I use the command line to use WXAgg, I receive the following traceback: >>> import matplotlib >>> matplotlib.use("WXAgg") >>> from matplotlib.matlab import * Traceback (most recent call last): File "<stdin>", line 1, in ? File "C:\Python23\Lib\site-packages\matplotlib\matlab.py", line 144, in ? from backends import new_figure_manager, error_msg, \ File "C:\Python23\Lib\site-packages\matplotlib\backends\__init__.py", line 39, in ? from backend_wxagg import \ File "C:\Python23\Lib\site-packages\matplotlib\backends\backend_wxagg.py", line 20, in ? from backend_wx import FigureManager File "C:\Python23\Lib\site-packages\matplotlib\backends\backend_wx.py", line 116, in ? wxapp = wxPySimpleApp() NameError: name 'wxPySimpleApp' is not defined This means that it gets past the try-except in backend_wx.py, but can't find wxPySimpleApp. In the previous post, when runing the code from a file, the exception was caught and a sysexit() occurred. I don't understand why in one case the exception is caught and not in the other. In either case, I'm still unable to use the wx backend. Thanks. Barry Drake --- Barry Drake wrote: > Having a problem with the WX backend; details > follow. > > I have wxPython 2.5 and > matplotlib-0.60.2.win32-py2.3 > installed. > > My code snippet: > import matplotlib > matplotlib.use("WXAgg") > from matplotlib.matlab import * > > Error msg: > Matplotlib backend_wx requires wxPython be installed > > Code snippet from: > C:\Python23\Lib\site-packages\matplotlib\backends\backend_wx.py > try: > from wxPython.wx import * > except: > print >>sys.stderr, "Matplotlib backend_wx > requires wxPython be installed" > sys.exit() > > I receive the following traceback when I try to > invoke > this from the command line: > > Enthought Edition build 1057 > Python 2.3.3 (#51, Feb 16 2004, 04:07:52) [MSC > v.1200 > 32 bit (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for > more information. > >>> from wxPython.wx import * > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File > "C:\Python23\lib\site-packages\wxPython\__init__.py", > line 10, in ? > import _wx > File > "C:\Python23\Lib\site-packages\wxPython\_wx.py", > line > 3, in ? > from core import * > File > "C:\Python23\Lib\site-packages\wxPython\core.py", > line > 15, in ? > import wx.core > File > "C:\Python23\lib\site-packages\wxPython\wx.py", > line 4, in ? > from misc import * > File > "C:\Python23\lib\site-packages\wxPython\misc.py", > line > 15, in ? > import wx.misc > File > "C:\Python23\lib\site-packages\wxPython\wx.py", > line 6, in ? > from misc2 import * > File > "C:\Python23\lib\site-packages\wxPython\misc2.py", > line 4, in ? > from windows import * > File > "C:\Python23\lib\site-packages\wxPython\windows.py", > line 15, in ? > import wx.windows > File > "C:\Python23\lib\site-packages\wxPython\wx.py", > line 10, in ? > from gdi import * > File > "C:\Python23\lib\site-packages\wxPython\gdi.py", > line > 15, in ? > import wx.gdi > File > "C:\Python23\lib\site-packages\wxPython\wx.py", > line 12, in ? > from fonts import * > File > "C:\Python23\lib\site-packages\wxPython\fonts.py", > line 120, in ? > class wxFontPtr(wxObjectPtr): > NameError: name 'wxObjectPtr' is not defined > > code snippet from: > C:\Python23\Lib\site-packages\wxPython\fonts.py > class wxFontPtr(wxObjectPtr): > > This doesn't seem to be a problem specific to > matplotlib. But, I'm wondering if anyone has > already solved this or I'm just missing something. > > Thanks. > Barry Drake > > > > ------------------------------------------------------- > This SF.Net email is sponsored by OSTG. Have you > noticed the changes on > Linux.com, ITManagersJournal and NewsForge in the > past few weeks? Now, > one more big change to announce. We are now OSTG- > Open Source Technology > Group. Come see the changes on the new OSTG site. > www.ostg.com > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: John H. <jdh...@ac...> - 2004-08-09 17:23:17
|
>>>>> "Eli" == Eli Glaser <eg...@se...> writes: Eli> Hello, I was wondering if there is any way to do a horizontal Eli> bar chart using Matplotlib? Any responses would be greatly Eli> appreciated. Not currently. Implementing matlab's 'barh' is left as an exercise to the reader :-) Kidding aside, this would be very easy to implement following the example of 'bar' and would be a nice addition. Submissions welcome! JDH The matlab barh doc string >> help barh BARH Horizontal bar graph. BARH(X,Y) draws the columns of the M-by-N matrix Y as M groups of N horizontal bars. The vector X must be monotonically increasing or decreasing. BARH(Y) uses the default value of X=1:M. For vector inputs, BARH(X,Y) or BARH(Y) draws LENGTH(Y) bars. The colors are set by the colormap. BARH(X,Y,WIDTH) or BARH(Y,WIDTH) specifies the width of the bars. Values of WIDTH > 1, produce overlapped bars. The default value is WIDTH=0.8. BARH(...,'grouped') produces the default vertical grouped bar chart. BARH(...,'stacked') produces a vertical stacked bar chart. BARH(...,LINESPEC) uses the line color specified (one of 'rgbymckw'). H = BARH(...) returns a vector of patch handles. Use SHADING FACETED to put edges on the bars. Use SHADING FLAT to turn them off. Examples: subplot(3,1,1), barh(rand(10,5),'stacked'), colormap(cool) subplot(3,1,2), barh(0:.25:1,rand(5),1) subplot(3,1,3), barh(rand(2,3),.75,'grouped') See also PLOT, BAR, BAR3H. |
From: Barry D. <bl...@ad...> - 2004-08-09 17:22:23
|
Having a problem with the WX backend; details follow. I have wxPython 2.5 and matplotlib-0.60.2.win32-py2.3 installed. My code snippet: import matplotlib matplotlib.use("WXAgg") from matplotlib.matlab import * Error msg: Matplotlib backend_wx requires wxPython be installed Code snippet from: C:\Python23\Lib\site-packages\matplotlib\backends\backend_wx.py try: from wxPython.wx import * except: print >>sys.stderr, "Matplotlib backend_wx requires wxPython be installed" sys.exit() I receive the following traceback when I try to invoke this from the command line: Enthought Edition build 1057 Python 2.3.3 (#51, Feb 16 2004, 04:07:52) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from wxPython.wx import * Traceback (most recent call last): File "<stdin>", line 1, in ? File "C:\Python23\lib\site-packages\wxPython\__init__.py", line 10, in ? import _wx File "C:\Python23\Lib\site-packages\wxPython\_wx.py", line 3, in ? from core import * File "C:\Python23\Lib\site-packages\wxPython\core.py", line 15, in ? import wx.core File "C:\Python23\lib\site-packages\wxPython\wx.py", line 4, in ? from misc import * File "C:\Python23\lib\site-packages\wxPython\misc.py", line 15, in ? import wx.misc File "C:\Python23\lib\site-packages\wxPython\wx.py", line 6, in ? from misc2 import * File "C:\Python23\lib\site-packages\wxPython\misc2.py", line 4, in ? from windows import * File "C:\Python23\lib\site-packages\wxPython\windows.py", line 15, in ? import wx.windows File "C:\Python23\lib\site-packages\wxPython\wx.py", line 10, in ? from gdi import * File "C:\Python23\lib\site-packages\wxPython\gdi.py", line 15, in ? import wx.gdi File "C:\Python23\lib\site-packages\wxPython\wx.py", line 12, in ? from fonts import * File "C:\Python23\lib\site-packages\wxPython\fonts.py", line 120, in ? class wxFontPtr(wxObjectPtr): NameError: name 'wxObjectPtr' is not defined code snippet from: C:\Python23\Lib\site-packages\wxPython\fonts.py class wxFontPtr(wxObjectPtr): This doesn't seem to be a problem specific to matplotlib. But, I'm wondering if anyone has already solved this or I'm just missing something. Thanks. Barry Drake |
From: John H. <jdh...@ac...> - 2004-08-09 17:19:31
|
>>>>> "Darren" == Darren Dale <dd...@co...> writes: Darren> After upgrading to Matplotlib 0.61, I am getting the Darren> following error: Unable to load image-loading module: Darren> C:\Program Files\Common Darren> Files\GTK\2.0/lib/gtk-2.0/2.2.0/loaders/svg_loader.dll Darren> The path is correct, the file exists, I wonder if the Darren> mixed path seperators is causing trouble? I cant find the Darren> location of this exception in matplotlib to look into it, Darren> where should I look? I'm note getting this error. My guess is that it is coming from the final lines of backend_gtk.py # set icon used when windows are minimized if gtk.pygtk_version >= (2,2,0): basedir = matplotlib.rcParams['datapath'] fname = os.path.join(basedir, 'matplotlib.svg') try: gtk.window_set_default_icon_from_file (fname) except gobject.GError, exc: print >>sys.stderr, exc My win32 pygtk is older than 2.2.0 which may be why I am not seeing it. Would you mind seeing if this is indeed the problem (for starters, just replace the conditional with 'if 0:'. If you get any more insight into the problem, be sure and let me know! Also, Steve, we might be better off here catching *all* exceptions rather than just the gobject error. Darren, would you test to see if this works # set icon used when windows are minimized if gtk.pygtk_version >= (2,2,0): basedir = matplotlib.rcParams['datapath'] fname = os.path.join(basedir, 'matplotlib.svg') try: gtk.window_set_default_icon_from_file (fname) except: print >>sys.stderr, 'Could not load matplotlib icon' FYI C:\Program Files\Common Files\GTK\2.0 # looks like the default registry path /lib/gtk-2.0/2.2.0/loaders/svg_loader.dll # looks like a path from pkgconfig JDH |
From: Darren D. <dd...@co...> - 2004-08-09 16:58:24
|
After upgrading to Matplotlib 0.61, I am getting the following error: Unable to load image-loading module: C:\Program Files\Common Files\GTK\2.0/lib/gtk-2.0/2.2.0/loaders/svg_loader.dll The path is correct, the file exists, I wonder if the mixed path seperators is causing trouble? I cant find the location of this exception in matplotlib to look into it, where should I look? |
From: Eli G. <eg...@se...> - 2004-08-09 15:20:48
|
Hello, I was wondering if there is any way to do a horizontal bar chart using = Matplotlib? Any responses would=20 be greatly appreciated. Thanks, Eli |
From: Peter G. <pgr...@ge...> - 2004-08-07 23:33:41
|
Hi: Below is a little part of my post from a while ago regarding x-axis scaling on plot_date plots. > > 2) The auto-scaling in plot_date() does not scale properly in some > special cases. Consider this: > > ----------------- > from matplotlib.matlab import * > > time2= [ > 1087321489.89, 1087321500.0, > 1087321789.89, 1087321800.0, 1087322089.89, 1087322100.0, > 1087322389.89, 1087322700.0, 1087322989.89, > 1087323000.0, 1087323289.89, 1087323300.0, 1087323589.89, > 1087323600.0, 1087323889.89, 1087323900.0, > 1087324189.89, 1087324200.0, 1087324489.89, 1087324500.0, ] > data2=[ 3.02, > 3.02, > 3.14, > 3.14, > 3.21, > 3.21, > 3.26, > 3.26, > 3.39, > 3.39, > 3.51, > 3.51, > 3.58, > 3.58, > 3.75, > 3.75, > 4.0, > 4.0, > 4.22, > 4.22,] > > plot_date(time2, data2, None, '-', color='b') > xlabel('time') > grid(True) > > show() > --------------- > > The same thing happens over differnt ranges when the amount of ticks > is large. Perhaps you may use something similar to the code below > (from axes.py) to deal with these things. Note the ceilings get rid of > the AssertErrors in ticks.Base when int() gives zero. Also, to > finalize this, > one would have to write a DayMultiLocator type class for the Weeks, > otherwise when the number of weeks is close, but less then the number > of weeks in numticks*months it will get crowded. This will probably be > a little more involved than dealing with days, but perhaps one could use > your existent WeekdayLocator class to simplify the problem. I added a quick and dirty version of this WeekMultiLocator that handles cases when the time range is many weeks but less than 5 months (say 17 weeks) and the ticks get over-crowded. Ideally one could have the weeks always start on some particular day - say Monday, but for me it doesnt really matter, and with the simple code below, thing seem to come out quite nice. In axes.py need: Line ~19: from ticker import YearLocator, MonthLocator, WeekdayLocator, \ DayLocator, HourLocator, MinuteLocator, DateFormatter, DayMultiLocator, WeekMultiLocator Line ~1475: def plot_date(self, d, y, converter, fmt='bo', **kwargs): """ plot_date(d, y, converter, fmt='bo', **kwargs) d is a sequence of dates; converter is a dates.DateConverter instance that converts your dates to seconds since the epoch for plotting. y are the y values at those dates. fmt is a plot format string. kwargs are passed on to plot. See plot for more information. pass converter = None if your dates are already in epoch format """ if not self._hold: self.cla() if converter is not None: e = array([converter.epoch(thisd) for thisd in d]) else: e = d assert(len(e)) ret = self.plot(e, y, fmt, **kwargs) span = self.dataLim.intervalx().span() if span==0: span = SEC_PER_HOUR minutes = span/SEC_PER_MIN hours = span/SEC_PER_HOUR days = span/SEC_PER_DAY weeks = span/SEC_PER_WEEK months = span/(SEC_PER_DAY*31) # approx years = span/(SEC_PER_WEEK*52) # approx numticks = 5 if years>numticks: locator = YearLocator(math.ceil(years/numticks)) fmt = '%Y' elif months>numticks: locator = MonthLocator(math.ceil(months/numticks)) fmt = '%b %Y' elif weeks>numticks: locator = WeekMultiLocator(math.ceil(weeks/numticks)) fmt = '%a, %b %d' elif days>numticks: locator = DayMultiLocator(math.ceil(days/numticks)) fmt = '%b %d' elif hours>numticks: locator = HourLocator(math.ceil(hours/numticks)) fmt = '%H:%M\n%b %d' elif minutes>numticks: locator = MinuteLocator(math.ceil(minutes/numticks)) fmt = '%H:%M:%S' else: locator = MinuteLocator(1) fmt = '%H:%M:%S' formatter = DateFormatter(fmt) self.xaxis.set_major_locator(locator) self.xaxis.set_major_formatter(formatter) self.autoscale_view() return ret In ticks.py: Need to add: class WeekMultiLocator(MultipleLocator): """ Make ticks on day which are multiples of base """ def __init__(self, base): MultipleLocator.__init__(self, base*SEC_PER_WEEK) -- Peter Groszkowski Gemini Observatory Tel: +1 808 974-2509 670 N. A'ohoku Place Fax: +1 808 935-9235 Hilo, Hawai'i 96720, USA |
From: Gary R. <ga...@em...> - 2004-08-06 01:54:39
|
> Stephen> However, in either case, the bars' left edge is at the x > Stephen> coordinate rather than being centered on it. I know this > Stephen> is the documented behavior, but Matlab centers the bars > Stephen> on the given X coordinates. How do people feel about > Stephen> changing matplotlib to match the Matlab behavior? I've > Stephen> changed my copy locally. > > Hi Stephen, > I'd be happy with this change. I CCd Gary Ruben who has done a lot of > work on the bar function because he'll likely have an opinion. Hi John, Since you ask, the proposed change makes perfect sense to me. Oh, and you're definitely overstating the changes I've done on barplots which was limited to tinkering with the errorbar part. Gary -- ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm |
From: John H. <jdh...@ac...> - 2004-08-05 22:55:56
|
>>>>> "Richard" == Richard Taylor <rt...@ec...> writes: Richard> I recently upgraded to the binary for Windows version Richard> 0.60.2 and found that the plus (+) symbol always plots in Richard> black even though a color is specified. My fix was to Richard> change the parameter lines.markeredgecolor to the color I Richard> wanted using the rc() command and then to revert to the Richard> default using rcdefaults(). This works ok for me but I Richard> thought you might want to know in case it's a bug. Yes, this is a bug, sort of. '+' is a marker. In the current matplotlib, the colorarg only sets the marker face color but not the edge color. For circles and the like, this is normally not a problem. But for '+' it makes no sense. In the next release, color args will affect both the edge and face colors, and you can override this by providing a kwarg, eg >>> plot(range(10), 'r+') # red plusses >>> plot(range(10), 'ro') # red circles, edge and face >>> plot(range(10), 'ro', markeredgecolor='k') # red face, black edge Thanks for letting me know. JDH |
From: Richard T. <rt...@ec...> - 2004-08-05 22:46:28
|
I recently upgraded to the binary for Windows version 0.60.2 and found that the plus (+) symbol always plots in black even though a color is specified. My fix was to change the parameter lines.markeredgecolor to the color I wanted using the rc() command and then to revert to the default using rcdefaults(). This works ok for me but I thought you might want to know in case it's a bug. Regards, Rich |