Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit db59e81

Browse filesBrowse files
authored
Merge pull request #7153 from efiring/DOC_log_locator_auto_N
DOC: entries for the new kwarg and behavior of LogLocator
2 parents 5ffd20d + 90d890a commit db59e81
Copy full SHA for db59e81

File tree

Expand file treeCollapse file tree

2 files changed

+21
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+21
-0
lines changed

‎doc/api/api_changes.rst

Copy file name to clipboardExpand all lines: doc/api/api_changes.rst
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,16 @@ consistently. For example, when both y-axes of a``twinx`` plot use
116116
``matplotlib.ticker.LinearLocator`` with the same number of ticks,
117117
their y-tick locations and grid lines will coincide.
118118

119+
`matplotlib.ticker.LogLocator` gains numticks kwarg
120+
---------------------------------------------------
121+
122+
The maximum number of ticks generated by the
123+
`~matplotlib.ticker.LogLocator` can now be controlled explicitly
124+
via setting the new 'numticks' kwarg to an integer. By default
125+
the kwarg is None which internally sets it to the 'auto' string,
126+
triggering a new algorithm for adjusting the maximum according
127+
to the axis length relative to the ticklabel font size.
128+
119129

120130
New defaults for 3D quiver function in mpl_toolkits.mplot3d.axes3d.py
121131
---------------------------------------------------------------------

‎doc/users/dflt_style_changes.rst

Copy file name to clipboardExpand all lines: doc/users/dflt_style_changes.rst
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,17 @@ or create a new `~matplotlib.ticker.MaxNLocator`::
896896
import matplotlib.ticker as mticker
897897
ax.set_major_locator(mticker.MaxNLocator(nbins=9, steps=[1, 2, 5, 10])
898898

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

900911
Auto limits
901912
-----------

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.