@@ -67,23 +67,19 @@ Previously, when the *patch_artist* parameter was set, `~Axes.bxp` would ignore
67
67
68
68
Major/minor tick collisions
69
69
~~~~~~~~~~~~~~~~~~~~~~~~~~~
70
- Minor ticks that collide with major ticks are now always hidden.
71
- Previously, certain locator classes (`LogLocator `, `AutoMinorLocator `)
72
- contained custom logic to avoid emitting tick locations that collided with
73
- major ticks when they were used as minor locators.
74
70
75
- This logic has now moved to the Axis class, and is used *regardless of the
76
- ticker class *. ``xaxis.minor.locator() `` now includes positions that collide
77
- with ``xaxis.major.locator() ``, but ``xaxis.get_minorticklocs() `` does not.
78
-
79
- You can control this behavior via the ``.remove_overlap `` attribute on the
80
- minor locator.
71
+ Minor ticks that collide with major ticks are now hidden by default.
72
+ Previously, certain locator classes (`~.ticker.LogLocator `,
73
+ `~.ticker.AutoMinorLocator `) contained custom logic to avoid emitting
74
+ tick locations that collided with major ticks when they were used as
75
+ minor locators. This logic has now moved to the `~.axis.Axis ` class,
76
+ and is used regardless of the locator class. You can control this
77
+ behavior via the `.Axis.remove_overlaping_locs ` attribute on
78
+ `~.axis.Axis `.
81
79
82
80
If you were relying on both the major and minor tick labels to appear
83
81
on the same tick, you may need to update your code. For example, the
84
- following snippet labeled days using major ticks, and hours and
85
- minutes using minor ticks and added a newline to the major ticks
86
- labels to avoid them crashing into the minor tick labels. ::
82
+ following snippet ::
87
83
88
84
import numpy as np
89
85
import matplotlib.dates as mdates
@@ -100,12 +96,17 @@ labels to avoid them crashing into the minor tick labels. ::
100
96
minor_locator=mdates.HourLocator((0, 6, 12, 18)),
101
97
minor_formatter=mdates.DateFormatter("%H:%M"),
102
98
)
103
- # disable removing overlapping ticks by adding this line
99
+ # disable removing overlapping locations
104
100
ax.xaxis.remove_overlapping_locs = False
105
101
plt.show()
106
102
107
- Setting the `.Axis.remove_overlapping_locs ` property (also available
108
- via `.Axis.set_remove_overlapping_locs ` and `~.pyplot.setp `).
103
+ labeled days using major ticks, and hours and minutes using minor
104
+ ticks and added a newline to the major ticks labels to avoid them
105
+ crashing into the minor tick labels. Setting the
106
+ `~.Axis.remove_overlapping_locs ` property (also accessible via
107
+ `~.Axis.set_remove_overlapping_locs ` /
108
+ `~.Axis.get_remove_overlapping_locs ` and `~.pyplot.setp `) disables
109
+ removing overlapping tick locations.
109
110
110
111
The major tick labels could also be adjusted include hours and
111
112
minutes, as the minor ticks are gone, so the ``major_formatter ``
0 commit comments