Axes label

Somebody at the usenet suggested that I play with the ticker formatter and locator. While that helped the multi-color sample I cited, it didn't help in my plots. The formatter only controls how the y-axis labels are formatted, whereas AFAIK the locator only affects the values of the ymajor and yminor.

So, back to my original question:

How do I force the first label to appear at the origin for all plots?

Thanks,

···

I found an example on the web that illustrates the question I
posted earlier about axes. See:

http://www.scipy.org/Cookbook/Matplotlib/MulticoloredLine

Notice that the y-axis goes from (-1.1, 1.1) but the first label is at -1.0. I really don't like that because when I read values off the graph, I have to keep reminding myself that the >origin is at -1.1. This may seem trivial but if you have to think, walk, chew gums at the same time you're reading the graph, it gets annoying - particularly if you have to read lots >of these graphs.

Is there a way to force the label to start at -1.1 instead of -1.0?

Thanks,

--
John Henry

How about

  ax.set_ylim(-1.1,1.1)
  ax.set_yticks([-1.1, 0, 1.1])

etc...

You can use custom locators as above to automate this, but if you know
the ticks you want, just set them.

···

On 3/2/07, kc106_2005-matplotlib@...9... <kc106_2005-matplotlib@...9...> wrote:

Somebody at the usenet suggested that I play with the ticker formatter and locator. While that helped the multi-color sample I cited, it didn't help in my plots. The formatter only controls how the y-axis labels are formatted, whereas AFAIK the locator only affects the values of the ymajor and yminor.

So, back to my original question:

How do I force the first label to appear at the origin for all plots?