Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e94d54c

Browse filesBrowse 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
Copy full SHA for e94d54c

File tree

Expand file treeCollapse file tree

2 files changed

+0
-11
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+0
-11
lines changed

‎lib/matplotlib/axis.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axis.py
-5Lines 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

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_ticker.py
-6Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.