On Mon, Jun 13, 2011 at 8:37 AM, Andrea Crotti <andrea.crott...@gmail.com>wrote:
>
> I found this question asked other times, but trying myself there is no
> way that I get something working..
>
> So I just want to generate a pdf from a plot with the smallest possible
> margin, and I was trying for example this:
>
> fig = plt.figure(1)
> fig.frameon = False
> plt.plot(range(10), range(10))
> plt.savefig('prova1.pdf')
>
> But the margin is still all there..
> Am I missing something?
>
> Try this:
ax = gca() # get the current axes
# fill the whole figure area from (0,0) to (1,1)
# units are in proportion to the figure
ax.set_position((0,0,1,1))
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users