On Wed, Jun 18, 2008 at 1:54 PM, David Warde-Farley <[EMAIL PROTECTED]> wrote:
> Hi folks,
>
> I'm using 'yticks' to set labels on the y axis, unfortunately they're
> rather long strings occasionally. I was wondering if there's a way to
> tweak the position of the axes within the plot, or better yet to have
> it automatically push the axes over so that the entire labels fit (I
> realize that's a tall order and would be quite happy with a way of
> tweaking it manually).

If you are using subplots, you can move them over using

  fig = figure()
  fig.subplots_adjust(left=0.2)

Alternatively, you can manually position your axes using the "axes"
command rather than the "subplot" command, but the above will probably
work for you.  We've done some work on auto-layout but w/o much
success.  You can however, make 0.2 (or whatever) the default in your
matplotlibrc file using the parameter (see
http://matplotlib.sf.net/matplotlibrc).  For example, you can set the
"left" parameter there with::

    figure.subplot.left  : 0.125  # the left side of the subplots of the figure


> Another (small, less important) question: is there a way to disable
> the actual 'ticks' and just have labels present?

The easiest way is to make them invisible::

    ax = subplot(111)
    for line in ax.get_yticklines():
        line.set_visible(False)

JDH

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to