Michael Hearne wrote: > All: I have an issue I'm hoping someone here can help with. I've > created a encapsulated postscript figure from pylab (basemap, > actually, but it shouldn't make a difference), and I'd like to have > the entire saved image be the extent of the axes, with no border > whatsoever. Is there a way to set the extent of either the axes or > the figure so that this is so? > > And before someone points this out to me - yes, I realize that there > are other tools (ImageMagick, for example) I could use to trim the > whitespace around the edge of the image, but this is part of an > automated system and I'd prefer not to have to bomb out to a shell for > something like that. > > Thanks, > > Mike > > Mike: Create an axes instance (before drawing anything with your basemap instance) like this:
fig = pylab.figure(figsize=(X,Y)) ax = fig.add_axes([0,0,1,1]) X and Y need to be set to the desired width and height of your figure in inches. To avoid having any border, Y/X must be exactly equal to the aspect ratio of the map projection region (which you can get from the 'aspect' Basemap instance variable). -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : [EMAIL PROTECTED] 325 Broadway Office : Skaggs Research Cntr 1D-124 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users