8000 FIX: restore de-confliction logic for minor ticks · matplotlib/matplotlib@8d4cee5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8d4cee5

Browse files
committed
FIX: restore de-confliction logic for minor ticks
In #13363 when `iter_ticks` was deprecated the in-lined logic did not account for the updates from #13314.
1 parent dd18211 commit 8d4cee5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/matplotlib/axis.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,17 +1064,18 @@ def _update_ticks(self):
10641064
Update ticks (position and labels) using the current data interval of
10651065
the axes. Return the list of ticks that will be drawn.
10661066
"""
1067-
1068-
major_locs = self.major.locator()
1069-
major_ticks = self.get_major_ticks(len(major_locs))
1067+
major_locs = self.get_majorticklocs()
10701068
major_labels = self.major.formatter.format_ticks(major_locs)
1069+
major_ticks = self.get_major_ticks(len(major_locs))
1070+
self.major.formatter.set_locs(major_locs)
10711071
for tick, loc, label in zip(major_ticks, major_locs, major_labels):
10721072
tick.update_position(loc)
10731073
tick.set_label1(label)
10741074
tick.set_label2(label)
1075-
minor_locs = self.minor.locator()
1076-
minor_ticks = self.get_minor_ticks(len(minor_locs))
1075+
minor_locs = self.get_minorticklocs()
10771076
minor_labels = self.minor.formatter.format_ticks(minor_locs)
1077+
minor_ticks = self.get_minor_ticks(len(minor_locs))
1078+
self.minor.formatter.set_locs(minor_locs)
10781079
for tick, loc, label in zip(minor_ticks, minor_locs, minor_labels):
10791080
tick.update_position(loc)
10801081
tick.set_label1(label)

0 commit comments

Comments
 (0)
0