Skip to content

DOC: entries for the new kwarg and behavior of LogLocator #7153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions doc/api/api_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ consistently. For example, when both y-axes of a``twinx`` plot use
``matplotlib.ticker.LinearLocator`` with the same number of ticks,
their y-tick locations and grid lines will coincide.

`matplotlib.ticker.LogLocator` gains numticks kwarg
---------------------------------------------------

The maximum number of ticks generated by the
`~matplotlib.ticker.LogLocator` can now be controlled explicitly
via setting the new 'numticks' kwarg to an integer. By default
the kwarg is None which internally sets it to the 'auto' string,
triggering a new algorithm for adjusting the maximum according
to the axis length relative to the ticklabel font size.


New defaults for 3D quiver function in mpl_toolkits.mplot3d.axes3d.py
---------------------------------------------------------------------
Expand Down
11 changes: 11 additions & 0 deletions doc/users/dflt_style_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,17 @@ or create a new `~matplotlib.ticker.MaxNLocator`::
import matplotlib.ticker as mticker
ax.set_major_locator(mticker.MaxNLocator(nbins=9, steps=[1, 2, 5, 10])

For a log-scaled axis the default locator is the
`~matplotlib.ticker.LogLocator`. Previously the maximum number
of ticks was set to 15, and could not be changed. Now there is a
`numticks` kwarg for setting the maximum to any integer value,
to the string 'auto', or to its default value of None which is
equivalent to 'auto'. With the 'auto' setting the maximum number
will be no larger than 9, and will be reduced depending on the
length of the axis in units of the tick font size. As in the
case of the AutoLocator, the heuristic algorithm reduces the
incidence of overlapping tick labels but does not prevent it.


Auto limits
-----------
Expand Down