Hi all

I'm a new user to matplotlib, and I'm having a little difficulty with something I feel must be basic. When I plot our data, I'm using a canvas that is 4"x4" at 128 DPI and saving the canvas as a png. Here's the basics of the code:

   imageWidth = 4
   imageHeight = 4
   DPI = 128

   figure1 = plt.figure(figsize=(imageWidth,imageHeight))
   plt.axis("off")
   plt.tricontourf(theTriangulation,
                   modelData,
                   theLookupTable.N,
                   cmap=theLookupTable)
   canvas = FigureCanvasAgg(figure1)
   canvas.print_figure(prefix + ".png", dpi=DPI)

The png is 512x512 as I would expect, but the contoured image doesn't fill the whole image. How do I tell the library to map the plotted are to the entire canvas and not leave a border around the rendered image?

Thanks
Howard

--
Howard Lander <mailto:how...@renci.org>
Senior Research Software Developer
Renaissance Computing Institute (RENCI) <http://www.renci.org>
The University of North Carolina at Chapel Hill
Duke University
North Carolina State University
100 Europa Drive
Suite 540
Chapel Hill, NC 27517
919-445-9651
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to