On Thu, Sep 23, 2010 at 10:31 AM, C M <cmpyt...@gmail.com> wrote:
> Until a more permanent solution is figured out, can anyone recommend
> any workarounds, even if they are a little clunky?  I'm embedding mpl
> plots in wxPython and am also finding this issue suboptimal.
> Che

A (partial) workaround is possible using the axes_grid1 toolkit (i.e.,
you need matplotlib 1.0).
Attached is a module I just cooked up (based on my previous attempt @
and it seems to work quite well.
The usage is simple.

        ax = plt.axes([0,0,1,1])

        ax.set_yticklabels(["very long label"])

        make_axes_area_auto_adjustable(ax) # This is where axes_grid1 comes in

Then, the axes area(including ticklabels and axis label) will be
automatically adjusted to fit in the given extent ([0, 0, 1, 1] in the
above case).

While this is mainly for a single axes plot, you may use it with
multi-axes plot (but somewhat trickier to use). A few examples are
included in the module.



Attachment: make_room_for_ylabel_using_axesgrid.py
Description: Binary data

Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
Matplotlib-users mailing list

Reply via email to