But in order to use this, I have to know ymin and ymax, based on the
data. But I thought this was the point of the locators--that they
could assign the ticks based on the range of the data and then some
rule about placement of ticks in that range. But when I look at the
various kinds of locators in the docs, none have a parameter that is
equivalent to the 0.5 above in set_ticks.
Or do they and I just missed it?
On Wed, Jul 20, 2011 at 7:56 PM, Gökhan Sever <gokhansever@...287...> wrote:
On Wed, Jul 20, 2011 at 5:41 PM, C M <cmpython@...287...> wrote:
On Wed, Jul 20, 2011 at 7:24 PM, Buchholz, Greg >> <gbuchholz@…3595…> wrote:
>>From: C M [mailto:cmpython@…287…]
>>Sorry, this is super-simple, but I'm lost in the whole
>>locator/formatter part of the docs.
>>How can I make a locator that just places a tick at every multiple of
>>0.5 around the data? So the y axis would look like:
> Do you want something like:
I'm not sure, because I can't try it out--I'm using the OO matplotlib,
not Pyplot. What's the equivalent of this in the OO API?
ax\.axis\(\(xmin, xmax, ymin, ymax\)\)
ax\.yaxis\.set\_ticks\(np\.arange\(1\.0, 4\.0, 0\.5\)\)