@@ -94,6 +94,9 @@ This logic has now moved to the Axis class, and is used *regardless of the
94
94
ticker class *. ``xaxis.minor.locator() `` now includes positions that collide
95
95
with ``xaxis.major.locator() ``, but ``xaxis.get_minorticklocs() `` does not.
96
96
97
+ You can control this behavior via the ``.remove_overlap `` attribute on the
98
+ minor locator.
99
+
97
100
If you were relying on both the major and minor tick labels to appear on the
98
101
same tick, you may need to update your code. For example, the following
99
102
snippet labeled days using major ticks, and hours and minutes using minor
@@ -114,15 +117,16 @@ ticks::
114
117
minor_locator=mdates.HourLocator((0, 6, 12, 18)),
115
118
minor_formatter=mdates.DateFormatter("%H:%M"),
116
119
)
117
-
120
+ # disables tick collision suppression
121
+ ax.axis.minor.locator.remove_overlap = False
118
122
plt.show()
119
123
120
124
and added a newline to the major ticks labels to avoid them crashing into the
121
125
minor tick labels.
122
126
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") ``.
126
130
127
131
usetex support
128
132
~~~~~~~~~~~~~~
0 commit comments