10000 Merge pull request #14092 from meeseeksmachine/auto-backport-of-pr-14… · matplotlib/matplotlib@e94d54c · GitHub
[go: up one dir, main page]

Skip to content

Commit e94d54c

Browse files
authored
Merge pull request #14092 from meeseeksmachine/auto-backport-of-pr-14056-on-v3.1.x
Backport PR #14056 on branch v3.1.x (FIX: do not try to manage the visibility of un-drawn ticks)
2 parents 11cb10b + 45bf1aa commit e94d54c

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

lib/matplotlib/axis.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,11 +1095,6 @@ def _update_ticks(self):
10951095
tick.set_label2(label)
10961096
ticks = [*major_ticks, *minor_ticks]
10971097

1098-
# mark the ticks that we will not be using as not visible
1099-
for t in (self.minorTicks[len(minor_locs):] +
1100-
self.majorTicks[len(major_locs):]):
1101-
t.set_visible(False)
1102-
11031098
view_low, view_high = self.get_view_interval()
11041099
if view_low > view_high:
11051100
view_low, view_high = view_high, view_low

lib/matplotlib/tests/test_ticker.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -965,9 +965,3 @@ def test_remove_overlap(remove_overlapping_locs, expected_num):
965965
assert len(ax.xaxis.get_minor_ticks()) == expected_num
966966
assert len(ax.xaxis.get_minorticklabels()) == expected_num
967967
assert len(ax.xaxis.get_minorticklines()) == expected_num*2
968-
969-
# force a draw to call _update_ticks under the hood
970-
fig.canvas.draw()
971-
# check that the correct number of ticks report them selves as
972-
# visible
973-
assert sum(t.get_visible() for t in ax.xaxis.minorTicks) == expected_num

0 commit comments

Comments
 (0)
0