Re: [Matplotlib-users] Safe SVN version
On Fri, Jan 23, 2009 at 1:51 PM, jason-s...@creativetrax.com wrote: Hello all, I am at a Sage days workshop and one of my goals is to update matplotlib in Sage. We want to pull from SVN since there are some (very *nice*) arrow-drawing features only in SVN. Is there any recent commit points that we want to avoid because of stability? If not, we'll probably update to the most recent svn version, which I'm pulling right now. Sorry for the late reply -- I suspect you are already done now, but I looked over the svn commit log since 98.5.2 and I don't see any serious changes that should make you cautious to use HEAD. JDH -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plotting a circle in log space
On Fri, Jan 23, 2009 at 2:06 PM, Michael Hearne mhea...@usgs.gov wrote: I have discovered, from the mailing list, the easy way to draw a circle in linear space: ...snip cx = 700 cy = 700 r = 1000 xmin = cx - r xmax = cx + r ymin = cy - r ymax = cy + r cir = Circle( (cx,cx), radius=r,facecolor='w',edgecolor='b') a = gca() a.add_patch(cir) axis([xmin,xmax,ymin,ymax]) axis('equal') How can I plot a circle in log space? The problem is that your circle has negative vertices since cx-r0 and cy-r0. When this happens, mpl is transforming the vertices with log coordinates and getting nans, as it should. The problem is that these nan vertices are getting passed to the agg backend, and when the vertex type is curve4, as it is for a circle, agg gets stuck in an infinite recursion in the spline code. I suspect this is because the recursion expects the comparison operator on the vertices to be well behaved, but it is not in the presence of nans. The function in question is agg_curve.cpp curve4_div::recursive_bezier. There is a maximum recursion limit in that function, but for some reason I don't understand, it is not breaking out of the function. I committed a simple fix to the branch and the trunk to simply drop any patch where any of the vertices are nans if not np.isnan(tpath.vertices).any(): renderer.draw_path(gc, tpath, affine, rgbFace) We might be able to do better than this -- is there a well defined way to deal with patches where any of the transformed vertices are nans? For simple polygons (no splines vertices), we could plot the polygon with all the nan containing vertices removed, though in some cases this could be a strange object -- this appears to be what was happening by default with CirclePolygon with negative vertices but I think this was mostly fortuitous that agg dealt with the nans gracefully in this case. But for patches containing curve vertices, this seems like a bad idea, since simply dropping vertices from a spline curve is not defined. I'm including below some sample code that shows the bug on Agg JDH import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib.patches as patches cx = 700 cy = 700 r = 1000 fig = plt.figure() ax = fig.add_subplot(111) #cir = patches.CirclePolygon( (cx,cy), radius=r,facecolor='w',edgecolor='b') cir = patches.Circle( (cx,cy), radius=r,facecolor='w',edgecolor='b') ax.add_patch(cir) ax.set_yscale('log') fig.savefig('test') plt.show() -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] matplotlib-0.98.5.2-py2.5-macosx10.5.mpkg install problem
Hi, I tried to install matplotlib-0.98.5.2-py2.5-macosx10.5.mpkg, but got the following error: You cannot install matplotlib 0.98.5.2-r0 on this volume. matplotlib requires System Python 2.5 to install. Python 2.5.1 is installed. It's my workhorse. What do I need to change so the package installer knows that it is present? $ ls -l /usr/bin/python lrwxr-xr-x 1 root wheel 72 Nov 18 2007 /usr/bin/python - ../../ System/Library/Frameworks/Python.framework/Versions/2.5/bin/python $ ls -l /System/Library/Frameworks/Python.framework/Versions/Current lrwxr-xr-x 1 root wheel 3 Nov 18 2007 /System/Library/Frameworks/ Python.framework/Versions/Current - 2.5 Glenn -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] open multiple plots from a program
I have been trying to figure out how to open up multiple plots from a traits program, without much luck. I tried threads, no joy. Is there a simple way to get multiple plots to come up? Would it work to fork off new processes for each plot? I haven't done that in python before, just perl, so before I dig too deeply into it, I thought I'd ask around. -- --- | Alan K. Jackson| To see a World in a Grain of Sand | | a...@ajackson.org | And a Heaven in a Wild Flower, | | www.ajackson.org | Hold Infinity in the palm of your hand | | Houston, Texas | And Eternity in an hour. - Blake | --- -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users