2011/2/22 Daniel Mader <danielstefanma...@googlemail.com>:
> Hi,
>
> there has been a similar question recently but I couldn't figure out
> if or how this is solved:
>
> I'd like to reduce the figure size so that I can add it to a LaTeX
> document without scaling (PDF output with LaTeX font rendering). For
> that, I need to adapt the font sizes, too.
>
> Unfortunately, the canvas is not properly scaled so that the axis
> labels and the possibly the tick marks are cut off.
>
> Is this a bug, feature, design flaw? How can I properly work around
> it, i.e. reduce the graph automatically for a given figsize/font size
> combination so that everything fits on the figure?

You'll have to understand how dimensions are calculated and then use
stuff like Figure.subplots_adjust.

http://matplotlib.sourceforge.net/api/figure_api.html#matplotlib.figure.Figure.subplots_adjust
http://matplotlib.sourceforge.net/api/figure_api.html#matplotlib.figure.SubplotParams
http://matplotlib.sourceforge.net/faq/howto_faq.html#automatically-make-room-for-tick-labels

As a fast and dirty trick you can pass big numbers to subplots_adjust
and then use bbox_inches='tight' in savefig.

Goyo

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to