diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index 3e6a06a14d66..38a515de699d 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -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 --------------------------------------------------------------------- diff --git a/doc/users/dflt_style_changes.rst b/doc/users/dflt_style_changes.rst index 26cfcfe74212..06fac3863381 100644 --- a/doc/users/dflt_style_changes.rst +++ b/doc/users/dflt_style_changes.rst @@ -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 -----------