Too long tick labels

Hello,

When I plot graph with values 10^5 and more at y axis, the labels are too long and run out of the picture borders. So I get "600000" instead of "1600000" at y axis or something like this. Tried to use

···

====
majorFormatter = ticker.FormatStrFormatter('%e')
ax.yaxis.set_major_formatter(majorFormatter)

but it became even worse -- "00e+00", "00e+05", "00e+06", i.e. first digits run out of picture border or I see only part of digit.

Is it possible to make matplotlib automatically change picture size due to it's content? Or maybe there is some other way to solve my problem?

Thanks.

--
Best Regards,
Dmitry Vinokurov
+7 905 862 17 11
skype: d.a.vinokurov
<df6.626@...287...>

Simply you can log scale your axes for such big ranges. Other
alternative would be shifting your subplot to left using figure
subplots_adjust function. Both Wx and Qt4 backends provide graphical
access to this function on navigation toolbar, so you can first
experiment to make the visual fit your need (If you use WX backend
actually you can see the numeric values to use in subplots_adjust
function).

You can also follow this thread:
http://old.nabble.com/scientific-notation-in-ticklabels-for-linear-plot-td29993489.html
to make fancier adjustments to tick labels.

···

On Fri, Oct 22, 2010 at 1:47 AM, Dmitry Vinokurov <df6.626@...287...> wrote:

Hello,

When I plot graph with values 10^5 and more at y axis, the labels are
too long and run out of the picture borders. So I get "600000" instead
of "1600000" at y axis or something like this. Tried to use

majorFormatter = ticker.FormatStrFormatter('%e')
ax.yaxis.set_major_formatter(majorFormatter)

but it became even worse -- "00e+00", "00e+05", "00e+06", i.e. first
digits run out of picture border or I see only part of digit.

Is it possible to make matplotlib automatically change picture size due
to it's content? Or maybe there is some other way to solve my problem?

Thanks.

--
Gökhan