Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
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}
(151) 
_{Aug}

_{Sep}

_{Oct}

_{Nov}

_{Dec}

S  M  T  W  T  F  S 







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





From: John Hunter <jdhunter@ac...>  20060731 20:57:46

>>>>> "David" == David Huard <david.huard@...> writes: David> Hi, I have a function fig(x) that returns a subplot David> instance, and I'd like to make a new figure by calling this David> function twice. David> For example: def fig(x): s = subplot(111) return s.plot(x) David> and i wan't to do something like: David> fig = figure(figsize = (6,12)) fig.add_axes(fig(x1)) David> fig.add_axes(fig(x2)) David> ax1, ax2 = fig.get_axes() ax1.set_position([.125, .5, .75, David> .4]) David> But it looks like the position is not understood relative David> to the new figure size, so it doesn't work. Should it or David> is there a better way to do that ? There are lots of problems with your code that makes it hard to understand what you are trying to do. Let's get some terminology straight by way of commenting your code, then maybe you can describe what you really want to do def fig(x): # subplot creates an Axes instance on a regular grid; it will add # this Axes to the current Figure, and if no Figure exists, it will # create on. If a current Figure exists, and you have already # created an Axes in it with subplot(111), this call simply makes # the Axes the current Axes. Technically, it creates a Subplot, # which is derived from Axes s = subplot(111) # plot returns a list of Line2D objects, and so the function "fig" # is returning a list of lines return s.plot(x) # this call creates a Figure instance fig = figure(figsize = (6,12)) # add_axes is used to add an Axes to the figure. It expects either an # Axes instance, or a rectangle determined by [left, bottom, width, # height]. You are passing it a list of lines, as noted above fig.add_axes(fig(x1)) fig.add_axes(fig(x2)) # this returns a list of axes ax1, ax2 = fig.get_axes() # this sets the rectangle for the first Axes ax1.set_position([.125, .5, .75, .4]) OK, now that we have some terminology down and hopefully you can see why you are failing, I'll try and guess what you want. You want to add an Axes to the current figure, and have them stacked one above the other. So on the first call, you basically have subplot(111), and on the second call, you have two subplots, subplot(211) and subplot(212). Something like from pylab import figure, show def pushax(fig, x): n = len(fig.axes) for i, ax in enumerate(fig.axes): print 'new gemo', n+1,1,i+1 ax.change_geometry(n+1,1,i+1) ax = fig.add_subplot(n+1, 1, n+1) ax.plot(x) fig = figure() pushax(fig, [1,2,3,4]) pushax(fig, [1,4,9,16]) show() See also the devel list, where Andrew Straw recently added a "Sizer" model along the lines of wx sizers for axes placement. Or I may have misunderstood what you want to do.... JDH 
From: Chris S <chrisspen@gm...>  20060731 20:36:11

Thanks, that's exactly what I was looking for. Chris On 7/31/06, Richard Albright <ralbright@...> wrote: > take a look at the finance_work2.py code on the screenshots page: > http://matplotlib.sourceforge.net/screenshots.html > > On Mon, 20060731 at 11:52 0400, Chris S wrote: > > I'm trying to plot dates using plot_date(), but the date for every > > point is labeled on the axis, and in a verbose format, resulting in a > > jumble of text making the dateaxis completely unreadable. Is there > > any way to control the format of the dates displayed, and ensure only > > a small percentage of points are labeled on the axis? > > > > Chris > > > >  > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share your > > opinions on IT & business topics through brief surveys  and earn cash > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > > Matplotlibusers mailing list > > Matplotlibusers@... > > https://lists.sourceforge.net/lists/listinfo/matplotlibusers >  > Rick Albright > Senior Quantitvative Analyst > Indie Research, LLC > 254 Witherspoon Street > Princeton, NJ 08542 > (609)4971030 > ralbright@... > > > 
From: David Huard <david.huard@gm...>  20060731 20:34:39

Hi, I have a function fig(x) that returns a subplot instance, and I'd like to make a new figure by calling this function twice. For example: def fig(x): s = subplot(111) return s.plot(x) and i wan't to do something like: fig = figure(figsize = (6,12)) fig.add_axes(fig(x1)) fig.add_axes(fig(x2)) ax1, ax2 = fig.get_axes() ax1.set_position([.125, .5, .75, .4]) But it looks like the position is not understood relative to the new figure size, so it doesn't work. Should it or is there a better way to do that ? Thanks, David 
From: PGM <pgmdevlist@gm...>  20060731 20:17:47

Chris, http://matplotlib.sourceforge.net/matplotlib.pylab.html#plot_date + google "date dateutils" site:http://matplotlib.sourceforge.net/tutorial.html + http://matplotlib.sourceforge.net/matplotlib_examples_0.87.1.zip And if this is not enough, please be a bit more specific in your request: an example of code you typed and better description of wehat you expected would do. Thx P. 
From: Alexander Michael <lxander.m@gm...>  20060731 19:20:09

I would like to create a plot axis with major tick labels centered *between* major tick markers instead below tick markers. If you are viewing this email with a fixedwidth font, it might look something like: ___.___.___.______.___.___.______.___.___.___ LABEL01 LABEL02 LABEL03 Ideally and ambitiously I would like both minor and major labels to be displayed stacked and boxed like: ___.___.___.______.___.___.______.___.___.___ _1__2__3__4__1__2__3__4__1__2__3__4_ ____LABEL01________LABEL02________LABEL03____ I've been poking around a bit through the examples, the mailing list and the source code, but haven't quite figured out how to carry out this customization. So far, I have created my own Locator and Formatter, but I have yet to figure out where I can calculate the label locations or put boxes around them. Your thoughts appreciated, Alex 
From: John Hunter <jdhunter@ac...>  20060731 18:04:49

>>>>> "Eric" == Eric Firing <efiring@...> writes: Eric> thread. I would like to remove it, together with Eric> copy_bbox_transform, on the grounds that these functions Eric> probably have not been used by anyone except during the last Eric> few days, and their functionality is available in a much Eric> more general way via the Transformation deepcopy and Eric> shallowcopy methods. Eric> Any objections? +1 Just make sure you document it in API_CHANGES and the CHANGELOG Thanks, JDH 
From: Eric Firing <efiring@ha...>  20060731 17:51:42

Thanks to all who contributed to this thread concerning how to draw something such as text at an offset relative to a data point, with the offset in screen coordinates so that it stays constant with zooming etc. The result in svn is a new function in transforms: def offset_copy(trans, fig=None, x=0, y=0, units='inches'): ''' Return a shallow copy of a transform with an added offset. args: trans is any transform kwargs: fig is the current figure; it can be None if units are 'dots' x, y give the offset units is 'inches', 'points' or 'dots' ''' This works for all transformations including polar; an example is given in examples/transoffset.py, also in svn. All transformations now have shallowcopy and deepcopy methods; the shallowcopy method is used in offset_copy. The deepcopy methods were there all along in _transforms.cpp, with functionality apparently partly duplicated in the copy_bbox_transform function in transforms.py. John added copy_bbox_transform_shallow to transforms.py as part of this thread. I would like to remove it, together with copy_bbox_transform, on the grounds that these functions probably have not been used by anyone except during the last few days, and their functionality is available in a much more general way via the Transformation deepcopy and shallowcopy methods. Any objections? Thanks. Eric 
From: Chris S <chrisspen@gm...>  20060731 15:52:29

I'm trying to plot dates using plot_date(), but the date for every point is labeled on the axis, and in a verbose format, resulting in a jumble of text making the dateaxis completely unreadable. Is there any way to control the format of the dates displayed, and ensure only a small percentage of points are labeled on the axis? Chris 
From: Charlie Moad <cwmoad@gm...>  20060731 14:21:02

On 7/31/06, Jo=E3o Quinta da Fonseca <joao.q.fonseca@...> wrote: > I'm trying to quit Matlab and use python fro my data analysis. I have > installed the latest MacPython (universal), wxpython, aggdraw and > matplotlib from pythonmac.org. Everything seems to work, apart from > matplotlib. Running from ipython: > > In [1]: from pylab import * > In [2]: plot([1,2,3,4]) > > I get: > > Out[2]: [<matplotlib.lines.Line2D instance at 0x4ddfb70>] > > but nothing appears, not even an error message. I get a bouncing > anvil (MacPython logo) on the dock but nothing happens. > If I run python in verbose mode I get: > > plot([1,2,3]) > import MacOS # dynamically loaded from /Library/Frameworks/ > Python.framework/Versions/2.4/lib/python2.4/libdynload/MacOS.so > [<matplotlib.lines.Line2D instance at 0x4c9eaa8>] > > unfortunately this means nothing to me. Can anyone help? Thanks, For noninteractive pylab, just type "show()" after your code above. The pylab option John mentioned is the ideal way to go though.  Charlie 
From: John Hunter <jdhunter@ac...>  20060731 14:10:04

>>>>> "Jo=E3o" =3D=3D Jo=E3o Quinta da Fonseca <joao.q.fonseca@...>= writes: Jo=E3o> I'm trying to quit Matlab and use python fro my data Jo=E3o> analysis. I have installed the latest MacPython (universal), Jo=E3o> wxpython, aggdraw and matplotlib from Jo=E3o> pythonmac.org. Everything seems to work, apart from Jo=E3o> matplotlib. Running from ipython: Jo=E3o> In [1]: from pylab import * In [2]: plot([1,2,3,4]) Did you launch ipython in pylab mode? > ipython pylab If so you don't need to import pylab and your figures your should work as expected. See http://matplotlib.sf.net/interactive.html for details. JDH 
From: <joao.q.fonseca@gm...>  20060731 14:08:03

I'm trying to quit Matlab and use python fro my data analysis. I have installed the latest MacPython (universal), wxpython, aggdraw and matplotlib from pythonmac.org. Everything seems to work, apart from matplotlib. Running from ipython: In [1]: from pylab import * In [2]: plot([1,2,3,4]) I get: Out[2]: [<matplotlib.lines.Line2D instance at 0x4ddfb70>] but nothing appears, not even an error message. I get a bouncing anvil (MacPython logo) on the dock but nothing happens. If I run python in verbose mode I get: plot([1,2,3]) import MacOS # dynamically loaded from /Library/Frameworks/ Python.framework/Versions/2.4/lib/python2.4/libdynload/MacOS.so [<matplotlib.lines.Line2D instance at 0x4c9eaa8>] unfortunately this means nothing to me. Can anyone help? Thanks, Joao 
From: <joao.fonseca@ma...>  20060731 14:01:29

I'm trying to quit Matlab and use python fro my data analysis. I have installed the latest MacPython (universal), wxpython, aggdraw and matplotlib from pythonmac.org. Everything seems to work, apart from matplotlib. Running from ipython: In [1]: from pylab import * In [2]: plot([1,2,3,4]) I get: Out[2]: [<matplotlib.lines.Line2D instance at 0x4ddfb70>] but nothing appears, not even an error message. I get a bouncing anvil (MacPython logo) on the dock but nothing happens. If I run python in verbose mode I get: plot([1,2,3]) import MacOS # dynamically loaded from /Library/Frameworks/ Python.framework/Versions/2.4/lib/python2.4/libdynload/MacOS.so [<matplotlib.lines.Line2D instance at 0x4c9eaa8>] unfortunately this means nothing to me. Can anyone help? Thanks, Joao 
From: Eric Emsellem <emsellem@ob...>  20060731 13:51:29

<!DOCTYPE html PUBLIC "//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO88591" httpequiv="ContentType"> </head> <body bgcolor="#ffffff" text="#000000"> beautiful!<br> I was in the meantime working out something using the suggestion Eric sent me (e.g. via pcolormesh) and I could work most of things I wanted out, but at the price of a rather stupidly looking management of the axis and rotation (maybe there is a way for improvement here too...). <br> Your solution may indeed be a cleaner way forward! I'll try both ways and see how I manage to get things done (the main problem being my rather poor ability in writing advanced codes in python...<br> <br> thanks &<br> cheers!<br> Eric<br> <br> John Hunter wrote: <blockquote cite="mid87lkq9dhyt.fsf@..." type="cite"> <blockquote type="cite"> <blockquote type="cite"> <blockquote type="cite"> <blockquote type="cite"> <blockquote type="cite"> <pre wrap="">"Eric" == Eric Emsellem <a class="moztxtlinkrfc2396E" href="mailto:emsellem@..."><emsellem@...></a> writes: </pre> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> <pre wrap=""><!> Eric> Hi, this is a question I have posted earlier, but Eric> unfortunately I didn't get any answer. if anybody has any Eric> hint on how to do this, I would be most graceful!! Thanks Eric> in advance! I looked at this a bit  the underlying image extension code handles image rotations but it is not exposed at the python level. I spent some time working on an image class that would handle rotations (in this test code below I just hardcoded the rotation for testing). The missing part is to get the extent and image placement algorithms to do the layout properly in the presence of rotation (eg handling extent and corners properly below). But this should give the enterprising developer a head start if they want to run with with. Basically, I just copied the guts out of the axes.image.AxesImage.make_image code to experiment with adding a rotation from matplotlib.image import AxesImage from pylab import subplot, show, nx ... </pre> </blockquote> <br> <pre class="mozsignature" cols="72"> ==================================================================== Eric Emsellem <a class="moztxtlinkabbreviated" href="mailto:emsellem@...">emsellem@...</a> Centre de Recherche Astrophysique de Lyon 9 av. CharlesAndre tel: +33 (0)4 78 86 83 84 69561 SaintGenis Laval Cedex fax: +33 (0)4 78 86 83 86 France <a class="moztxtlinkfreetext" href="http://wwwobs.univlyon1.fr/eric.emsellem">http://wwwobs.univlyon1.fr/eric.emsellem</a>; ==================================================================== </pre> </body> </html> 
From: John Hunter <jdhunter@ac...>  20060731 13:36:15

>>>>> "Eric" == Eric Emsellem <emsellem@...> writes: Eric> Hi, this is a question I have posted earlier, but Eric> unfortunately I didn't get any answer. if anybody has any Eric> hint on how to do this, I would be most graceful!! Thanks Eric> in advance! I looked at this a bit  the underlying image extension code handles image rotations but it is not exposed at the python level. I spent some time working on an image class that would handle rotations (in this test code below I just hardcoded the rotation for testing). The missing part is to get the extent and image placement algorithms to do the layout properly in the presence of rotation (eg handling extent and corners properly below). But this should give the enterprising developer a head start if they want to run with with. Basically, I just copied the guts out of the axes.image.AxesImage.make_image code to experiment with adding a rotation from matplotlib.image import AxesImage from pylab import subplot, show, nx class RotatedImage(AxesImage): def make_image(self): from matplotlib.colors import normalize, colorConverter from matplotlib.numerix import arange, asarray, UInt8, Float32, repeat, NewAxis, typecode import matplotlib._image as _image if self._A is not None: if self._imcache is None: if typecode(self._A) == UInt8: im = _image.frombyte(self._A, 0) im.is_grayscale = False else: x = self.to_rgba(self._A, self._alpha) im = _image.fromarray(x, 0) if len(self._A.shape) == 2: im.is_grayscale = self.cmap.is_gray() else: im.is_grayscale = False self._imcache = im else: im = self._imcache else: raise RuntimeError('You must first set the image array or the image attribute') bg = colorConverter.to_rgba(self.axes.get_frame().get_facecolor(), 0) if self.origin=='upper': im.flipud_in() im.set_bg( *bg) im.set_interpolation(self._interpd[self._interpolation]) # image input dimensions numrows, numcols = im.get_size() im.reset_matrix() xmin, xmax, ymin, ymax = self.get_extent() dxintv = xmaxxmin dyintv = ymaxymin # the viewport scale factor sx = dxintv/self.axes.viewLim.width() sy = dyintv/self.axes.viewLim.height() if im.get_interpolation()!=_image.NEAREST: im.apply_translation(1, 1) # the viewport translation tx = (xminself.axes.viewLim.xmin())/dxintv * numcols #if flipy: # ty = (ymaxself.axes.viewLim.ymax())/dyintv * numrows #else: # ty = (yminself.axes.viewLim.ymin())/dyintv * numrows ty = (yminself.axes.viewLim.ymin())/dyintv * numrows l, b, widthDisplay, heightDisplay = self.axes.bbox.get_bounds() im.apply_translation(tx, ty) im.apply_scaling(sx, sy) # resize viewport to display rx = widthDisplay / numcols ry = heightDisplay / numrows im.apply_scaling(rx, ry) im.apply_rotation(45.) #print tx, ty, sx, sy, rx, ry, widthDisplay, heightDisplay im.resize(int(widthDisplay+0.5), int(heightDisplay+0.5), norm=self._filternorm, radius=self._filterrad) if self.origin=='upper': im.flipud_in() return im ax = subplot(111) im = RotatedImage(ax, interpolation='nearest') im.set_data(nx.mlab.rand(10,10)) xmin, xmax, ymin, ymax = im.get_extent() corners = (xmin, ymin), (xmax, ymax) ax.update_datalim(corners) ax.set_xlim((xmin, xmax)) ax.set_ylim((ymin, ymax)) ax.images.append(im) show() 
From: Eric Firing <efiring@ha...>  20060731 01:16:46

I think you can get the effect you describe using pcolor or pcolormesh; the latter is faster but due to a bug it doesn't handle alpha values other than 1. You will have to generate arrays with the pixel corners (not centers) as you want them to be after your rotation. You will want to use the shading='flat' kwarg. Eric Eric Emsellem wrote: > Hi, > > this is a question I have posted earlier, but unfortunately I didn't get > any answer. > if anybody has any hint on how to do this, I would be most graceful!! > Thanks in advance! > > I would like to visualize an image after a rotation: > ==> this means to view each squared pixels as "rotated" (seen as an > rotated square). I have in fact several images which I need to plot on > the same figure (with subplot), each of these having different "rotation > angles". > > The rough solution would be to rotate the data itself (x and y) and use > imshow after some rebinning on a squared grid. But this would not be > showing the original data, which is what I wish to do. > Is it possible to do this in mpl? > > thanks! > > Eric > >  > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys  and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers 
From: Richard Ruth <richjunk@pa...>  20060730 23:49:45

Thank you for the 'fix'. Both the demo and my old matplotlib based scripts work again. Richard On Friday 28 July 2006 17:19, Richard Ruth wrote: > I upgraded to matplotlib0.87.4 Now I receive an error like the following > every time I try to use matplotlib.dates. The following error messages > were generated when I tried to run matplotlib0.87.4/examples/date_demo1.py > > Any Idea on how I can get dates working again? > (I am running the 2.6.17.6 kernel on a 64bit linux system) Richard, in matplotlib/dates.py, change line 155 from remainder = x  ix to remainder = float(x)  ix The problem is that matplotlib uses numpy arrays for the xaxis. As you have a 64b system, the arrays are in float64scalars, that divmod doesn't know how to process (unless you have a very recent of numpy). The trick above forces a downcasting of float64scalar to float32scalar, divmod can now work. 
From: Webb Sprague <webb.sprague@gm...>  20060730 23:28:16

I am doing a buch of plots and I would like to set the dash on/off list globally (to [2,4]) rather than everytime I run pylab.plot(). Is there any such thing? Thanks! 
From: Eric Emsellem <emsellem@ob...>  20060730 20:38:00

Hi, this is a question I have posted earlier, but unfortunately I didn't get any answer. if anybody has any hint on how to do this, I would be most graceful!! Thanks in advance! I would like to visualize an image after a rotation: ==> this means to view each squared pixels as "rotated" (seen as an rotated square). I have in fact several images which I need to plot on the same figure (with subplot), each of these having different "rotation angles". The rough solution would be to rotate the data itself (x and y) and use imshow after some rebinning on a squared grid. But this would not be showing the original data, which is what I wish to do. Is it possible to do this in mpl? thanks! Eric 
From: Eric Firing <efiring@ha...>  20060730 00:31:40

Stefan van der Walt wrote: > On Thu, Jul 27, 2006 at 08:57:47PM 0400, PGM wrote: > >>>Is this normal? If so, how do I get around the problem? I also >>>noticed that, even without extents, the image gets scaled after >>>plotting. >> >>Try to set the "_autoscale" parameter of your current 'axes' to False. That >>way, you should avoid any inopportune rescaling. For the image, try to use >>aspect='auto'. >> >>For example, >> >>P.imshow(x,extent=(0,x.shape[1],x.shape[0],0)) >>P.gca().set_autoscale_on(False) > > > Thanks, P., that did the trick! It looks like the right way to fix > the scaling of the axes extents, but I am still not sure whether the > axis flipping behaviour I described earlier is correct. I changed it in svn 2636; now Axes.autoscale_view() preserves axis direction. I think this will be generally useful and will cause less user surprise than the previous behavior. Eric 
From: Eric Firing <efiring@ha...>  20060729 23:47:03

Nick, svn 2635 has a fix for this bug. Eric Nick Fotopoulos wrote: > Dear matplotlibusers, > > I'd like to report a bug in Polygon, which is crashing with an > unhelpful error message where an exception would be appropriate. The > problem occurs when you feed Polygon an Nx2 array instead of an N > length list of 2tuples. This is on my PPC OSX system, with > everything freshly checked out from SVN (should the matplotlib > version still be 0.87.4?). > > Versions: > In [152]: numpy.__version__ > Out[152]: '1.1.2881' > In [154]: matplotlib.__version__ > Out[154]: '0.87.4' > > > Code: > import pylab, numpy > > theta = numpy.pi/4*numpy.arange(9,dtype=float) > > x = numpy.cos(theta) > y = numpy.sin(theta) > > # The following line works > #p = pylab.Polygon(zip(x,y)) > > # The following line causes a crash > p = pylab.Polygon(numpy.vstack((x,y)).T) > > ax = pylab.subplot(111) > ax.add_patch(p) > pylab.show() 
From: Eric Firing <efiring@ha...>  20060729 22:19:00

Nick, Thanks for the bug report. I have been making some changes to use numerix more consistently internally, and fixing this bug would be a step in that direction. I will take a look. Eric Nick Fotopoulos wrote: > Dear matplotlibusers, > > I'd like to report a bug in Polygon, which is crashing with an > unhelpful error message where an exception would be appropriate. The > problem occurs when you feed Polygon an Nx2 array instead of an N > length list of 2tuples. This is on my PPC OSX system, with > everything freshly checked out from SVN (should the matplotlib > version still be 0.87.4?). > > Versions: > In [152]: numpy.__version__ > Out[152]: '1.1.2881' > In [154]: matplotlib.__version__ > Out[154]: '0.87.4' > > > Code: > import pylab, numpy > > theta = numpy.pi/4*numpy.arange(9,dtype=float) > > x = numpy.cos(theta) > y = numpy.sin(theta) > > # The following line works > #p = pylab.Polygon(zip(x,y)) > > # The following line causes a crash > p = pylab.Polygon(numpy.vstack((x,y)).T) > > ax = pylab.subplot(111) > ax.add_patch(p) > pylab.show() > > > Output: > In [155]: run plot_polygon.py >  >  > exceptions.TypeError Traceback (most > recent call last) > > /Users/nvf/Documents/S.M. Thesis/plot_polygon.py > 10 > 11 ax = pylab.subplot(111) > > 12 ax.add_patch(p) > 13 pylab.show() 14 > > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site > packages/matplotlib/axes.py in add_patch(self, p) > 899 p.get_transform(), p.get_verts()) > 900 #for x,y in xys: print x,y > > 901 self.update_datalim(xys) > 902 self.patches.append(p) > 903 > > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site > packages/matplotlib/axes.py in update_datalim(self, xys) > 913 # Otherwise, it will compute the bounds of it's > current data > 914 # and the data in xydata > > 915 self.dataLim.update(xys, 1) > 916 > 917 > > TypeError: CXX : Error creating object of type N2Py5TupleE > WARNING: Failure executing file: <plot_polygon.py> > > > Instead of converting from crash to exception, though, would it be > possible to make it accept an Nx2 array? > > Please at least cc me in any replies, as I am not subscribed to this > list. > > Thanks, > Nick > >  > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys  and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers 
From: John Hunter <jdhunter@ac...>  20060729 18:11:46

>>>>> "PGM" == PGM <pgmdevlist@...> writes: PGM> Richard, in matplotlib/dates.py, change line 155 from PGM> remainder = x  ix to remainder = float(x)  ix Thanks for th tip  I'll commit this to svn. JDH 
From: PGM <pgmdevlist@gm...>  20060729 17:28:03

On Friday 28 July 2006 17:19, Richard Ruth wrote: > I upgraded to matplotlib0.87.4 Now I receive an error like the following > every time I try to use matplotlib.dates. The following error messages > were generated when I tried to run matplotlib0.87.4/examples/date_demo1.py > > Any Idea on how I can get dates working again? > (I am running the 2.6.17.6 kernel on a 64bit linux system) Richard, in matplotlib/dates.py, change line 155 from remainder = x  ix to remainder = float(x)  ix The problem is that matplotlib uses numpy arrays for the xaxis. As you have a 64b system, the arrays are in float64scalars, that divmod doesn't know how to process (unless you have a very recent of numpy). The trick above forces a downcasting of float64scalar to float32scalar, divmod can now work. 
From: Jouni K Seppanen <jks@ik...>  20060729 10:59:21

From: Jouni K Seppanen <jks@ik...>  20060729 05:47:18

Till Wagner <sacro_thaan@...> writes: > The program should be localized to german, frensh, italian and > spanish, so the names can include some umlauts and special > characters (like ä, ü, ö, ß, ß, é and so on). In my program it works > well, but in the matplotlibgraphs are only squares where the > umlauts should be. Same with the legend. Any help or tips? The font encoding doesn't match the encoding you're using. Using unicode strings, e.g. u"\u00e4" for ä, may work better, assuming of course that the font does have the characters you need and that the backend implements unicode text. Some resources about Unicode in Python are http://www.jorendorff.com/articles/unicode/python.html http://dalchemy.com/opensource/unicodedoc/  Jouni 