@@ -94,6 +94,9 @@ This logic has now moved to the Axis class, and is used *regardless of the
9494ticker class *. ``xaxis.minor.locator() `` now includes positions that collide
9595with ``xaxis.major.locator() ``, but ``xaxis.get_minorticklocs() `` does not.
9696
97+ You can control this behavior via the ``.remove_overlap `` attribute on the
98+ minor locator.
99+
97100If you were relying on both the major and minor tick labels to appear on the
98101same tick, you may need to update your code. For example, the following
99102snippet labeled days using major ticks, and hours and minutes using minor
@@ -114,15 +117,16 @@ ticks::
114117 minor_locator=mdates.HourLocator((0, 6, 12, 18)),
115118 minor_formatter=mdates.DateFormatter("%H:%M"),
116119 )
117-
120+ # disables tick collision suppression
121+ ax.axis.minor.locator.remove_overlap = False
118122 plt.show()
119123
120124and added a newline to the major ticks labels to avoid them crashing into the
121125minor tick labels.
122126
123- With the API change, the major tick labels should also include hours and
124- minutes, as the minor ticks are gone, so the ``major_formatter `` should be
125- ``mdates.DateFormatter("%H:%M\n%a") ``.
127+ The major tick labels could also be adjusted include hours and
128+ minutes, as the minor ticks are gone, so the ``major_formatter ``
129+ should be ``mdates.DateFormatter("%H:%M\n%a") ``.
126130
127131usetex support
128132~~~~~~~~~~~~~~
0 commit comments