10000 FIX: do not try to manage the visibility of un-drawn ticks (#14056) · matplotlib/matplotlib@6f20709 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6f20709

Browse files
authored
FIX: do not try to manage the visibility of un-drawn ticks (#14056)
FIX: do not try to manage the visibility of un-drawn ticks
2 parents e59b93b + b2f9cec commit 6f20709

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
@@ -1122,11 +1122,6 @@ def _update_ticks(self):
11221122
tick.set_label2(label)
11231123
ticks = [*major_ticks, *minor_ticks]
11241124

1125-
# mark the ticks that we will not be using as not visible
1126-
for t in (self.minorTicks[len(minor_locs):] +
1127-
self.majorTicks[len(major_locs):]):
1128-
t.set_visible(False)
1129-
11301125
view_low, view_high = self.get_view_interval()
11311126
if view_low > view_high:
11321127
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
@@ -963,9 +963,3 @@ def test_remove_overlap(remove_overlapping_locs, expected_num):
963963
assert len(ax.xaxis.get_minor_ticks()) == expected_num
964964
assert len(ax.xaxis.get_minorticklabels()) == expected_num
965965
assert len(ax.xaxis.get_minorticklines()) == expected_num*2
966-
967-
# force a draw to call _update_ticks under the hood
968-
fig.canvas.draw()
969-
# check that the correct number of ticks report them selves as
970-
# visible
971-
assert sum(t.get_visible() for t in ax.xaxis.minorTicks) == expected_num

0 commit comments

Comments
 (0)
0