[Matplotlib-users] MaxNLocator and steps [2.0.0rc0]
efiring at hawaii.edu
Sun Jan 8 22:10:02 EST 2017
See https://github.com/matplotlib/matplotlib/pull/7770. This is what I
had in mind to get MaxNLocator behavior closer to what you want. I
think the problem that would remain is that sometimes you would get
6-second intervals, which you probably don't want.
I'm not sure whether the way to get exactly what you want (assuming I
understand it correctly) is via an additional kwarg to MaxNLocator, or
whether it would be better to make a different locator for this purpose.
On 2017/01/08 2:44 PM, Brian McFee wrote:
> Hi everyone [long-time user, first-time poster],
> I recently ran aground of a change in MaxNLocator introduced in 2.0.0rc0
> by this PR: https://github.com/matplotlib/matplotlib/pull/7586. This
> change warns if the steps parameter has values outside the range [1,
> 10], and is justified in the
> issue https://github.com/matplotlib/matplotlib/issues/7578 by compliance
> with the docstring.
> I have been using MaxNLocator with steps=[1, 5, 10, 15, 60] (or
> thereabouts) to label time-axis plots with units in seconds, and
> position ticks at "nice" fractions of minutes. Apparently, I've been
> doing it wrong! Does anyone have advice about how to recover the
> previous behavior without doing-it-wrong?
> Matplotlib-users mailing list
> Matplotlib-users at python.org
More information about the Matplotlib-users