Re: [Matplotlib-users] 3D curve and errors in axes3d
belinda thom wrote: [...] Here's more info (redundant?) regarding what I've tried, in case it clarifies. (Ultimately, I will obviously need to upgrade to 0.9, at which point I can report back on if this fixed the problem on my machine, but I can't do that until after the semester is over, mid May). I'm running MacPython 2.4.4. I've got matplotlib 0.87.7 w/TkAgg. I'm using IPython 0.7.4.svn.r2010, called with the -pylab flag. I'm running the tests reported here on a G5 (I've also seen them on a G4), using OS X 10.4.8. Belinda, I was not paying close enough attention and did not realize that you are all the way back at 0.87.7. I think that trying to do any kind of piecemeal updating of that to get 3d working decently is an exercise in futility; a lot of things have changed since then, some problems in 3d have been fixed but it still can't be considered operational, and Tim's recent work has been post-0.90, so upgrading to that is still not likely to be very satisfactory. A new release is planned soon--maybe next week?--and that would certainly get you closer. But overall, I think that trying to use mpl 3d functionality for a class this term is not a good idea. There is a lot you can do in 2d with 0.87.7; I think you would really be best advised to find a way to make that adequate for the purposes of your class this term. The easiest way to see some of the things that have changed is to go to http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/ and browse the archive, especially lib/matplotlib, where the pure python parts are. 0.87.7 was released at revision 2835. You can also get an overview from CHANGELOG and API_CHANGES. 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.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Basemap 3D
Hi Jeff, I want to display some pollutants concentrations saved in shapefiles on maps displayed in 3D. You can have a look of what I need here: http://rockware.com/catalog/pages/arcgis3dfeat1.html, in the last image. Le Jeudi 12 Avril 2007 16:40, Jeff Whitaker a écrit : Lionel Roubeyrie wrote: Hi all, not sure it's possible, I can't find any example but I ask : is there a way to make some 3D maps with Basemap, like we can do with ArcScene (ESRI), mixing rasters or shapefiles with TINs? If no, do you know a way to do so with python? Thanks Lionel: I don't know, but I honestly doubt it. Matplotlib is fundamentally a 2-D package, there is a bit of mostly unsupported 3-D stuff that has been bolted on. Can you be more specific about what you mean though? Perhaps a link to an example? I have had good luck with ncvtk (http://ncvtk.sourceforge.net/), but I think it only really works if your data is global and in a netCDF file. -Jeff -- Lionel Roubeyrie - [EMAIL PROTECTED] Chagé d'études et de maintenance LIMAIR - la Surveillance de l'Air en Limousin http://www.limair.asso.fr - 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.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Omitting curves from a legend
There are a couple things about legend that I'm finding a little irksome. Is there some better way to do this? 1) if you have a contour, legend() wants to add all the contours to the list. calling contour(...,label='_nolegend_') doesn't seem to help. I'm trying to plot a bunch of different types of markers on top of a contour plot, and put just the markers in the legend. The workaround seems to be contour(. . . ) p1 = plot( . . .) p2 = plot(. . .) . . . pN = plot(. . .) legend((p1,p2,...,pN), ('Legend1', 'Legend2', ... , 'LegendN')) Basically I have to save the plot data and repeat myself later. 2) The '_nolegend_' trick doesn't work for things in the simple call style for legend() legend('_nolegend_', 'Data 1', 'Data 2') That makes a legend containing the string _nolegend_. My first hunch to do that before looking at the docs at all was to put in a None for a legend I wanted to leave off. That's raises an error though. Might be nice if it was made a legal way to omit something from the legend. --bb - 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.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Fatal Python error: deallocating None
I'm using matplotlib with Python 2.4.4 to make scatter plots of a reasonably large dataset. Specifically about 200 plots with around 3224 points each. Unfortunately after about 30-40 plots, python invariably crashes with the error: Fatal Python error: deallocating None Aborted below is the code which is causing the crash, I've tried it with various backends with the same results. Any ideas how to avoid this? Many thanks in advance, John for ani in range(an1, an2): if ba1 = ani: ba1 = ani + 1 for bli in range(ba1, ba2): if v.blank[ani, bli]: continue for chi in range(v.nch): plot(v.iat, v.amp[:,ani,bli,0,chi,0], ',') plot(v.iat, v.amp[:,ani,bli,0,chi,1], ',') plot(v.iat, v.amp[:,ani,bli,1,chi,0], ',') plot(v.iat, v.amp[:,ani,bli,1,chi,1], ',') title('Baseline ' + str(ani) + ',' + str(bli)) savefig('TimeSeries' + str(ani) + '-' + str(bli)) close() print 'printing baseline ' + str(ani) + '/' + str(bli) - 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.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Basemap 3D
Lionel Roubeyrie wrote: Hi Jeff, I want to display some pollutants concentrations saved in shapefiles on maps displayed in 3D. You can have a look of what I need here: http://rockware.com/catalog/pages/arcgis3dfeat1.html, in the last image. Le Jeudi 12 Avril 2007 16:40, Jeff Whitaker a écrit : Lionel Roubeyrie wrote: Hi all, not sure it's possible, I can't find any example but I ask : is there a way to make some 3D maps with Basemap, like we can do with ArcScene (ESRI), mixing rasters or shapefiles with TINs? If no, do you know a way to do so with python? Thanks Lionel: I don't know, but I honestly doubt it. Matplotlib is fundamentally a 2-D package, there is a bit of mostly unsupported 3-D stuff that has been bolted on. Can you be more specific about what you mean though? Perhaps a link to an example? I have had good luck with ncvtk (http://ncvtk.sourceforge.net/), but I think it only really works if your data is global and in a netCDF file. -Jeff Lionel: Sorry, but basemap can't do that (and can't really be extended to do that either). -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1FAX : (303)497-6449 325 BroadwayBoulder, CO, USA 80305-3328 - 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.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Basemap: how to fill continents and then contourf over filled continents?
Hi list, is there a way to fill continents with basemap an then use contourf to draw filled contours over the continents? Its useless when the filled contours cover the whole map, but when only parts of the map are covered with filled contours, it would be nice to paint over the continents (but still let the coastlines and countries shine through the filled contours). Thanks for any hints Simon - 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.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Basemap: how to fill continents and then contourf over filled continents?
Simon Kammerer wrote: Hi list, is there a way to fill continents with basemap an then use contourf to draw filled contours over the continents? Its useless when the filled contours cover the whole map, but when only parts of the map are covered with filled contours, it would be nice to paint over the continents (but still let the coastlines and countries shine through the filled contours). Thanks for any hints Simon - Simon: I just added a zorder keyword to fillcontinents in basemap SVN: --- basemap.py (revision 3192) +++ basemap.py (working copy) @@ -1299,7 +1299,7 @@ # set axes limits to fit map region. self.set_axes_limits(ax=ax) -def fillcontinents(self,color='0.8',ax=None): +def fillcontinents(self,color='0.8',ax=None,zorder=1): Fill continents. @@ -1342,9 +1342,9 @@ if not hasp1 or not hasp2 or not hasp3 or not hasp4: xy = zip(xa.tolist(),ya.tolist()) if self.coastpolygontypes[np] != 2: -poly = Polygon(xy,facecolor=color,edgecolor=color,linewidth=0) +poly = Polygon(xy,facecolor=color,edgecolor=color,linewidth=0,zorder=zorder) else: # lakes filled with background color. -poly = Polygon(xy,facecolor=axisbgc,edgecolor=axisbgc,linewidth=0) +poly = Polygon(xy,facecolor=axisbgc,edgecolor=axisbgc,linewidth=0,zorder=zorder) ax.add_patch(poly) np = np + 1 You can now set zorder=0 if you want contourf to paint over the filled continents. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1FAX : (303)497-6449 325 BroadwayBoulder, CO, USA 80305-3328 - 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.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Matplotlib 0.90.0 on OS-X with wxPython2.8.3
One more question: What impact does disabling the accelerator have? Will this slow down plotting in some situations? -stephen On 4/12/07, Christopher Barker [EMAIL PROTECTED] wrote: Stephen Uhlhorn wrote: Just to be clear, the installation order is: 1) install python2.5 from macpython. 2) remove wxagg.so 3) install wxpython frim macpython 4) install numpy/mpl from macpython that's out of order. wxagg.so is part of mpl, so: 1) install python2.5 from macpython. 2) install wxpython frim macpython 3) install numpy/mpl from macpython 4) remove wxagg.so -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] - 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.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] contour and contourf order
Jordan Dawe wrote: So I've got a plot with a contour and a contourf on it. The contour always appears on top of the contourf, no matter what order I issue the commands in; I want to use the contourf to block out part of the contour. ContourSets don't appear to have a zorder. How do I do this? Jordan, The ContourSet has a collections attribute which is a list of either LineCollection or PolyCollection objects. Each of these is an Artist, and all Artists have zorder, so you should be able to iterate over them and use their set_zorder methods to modify the zorder. 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.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/matplotlib-users