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 c1ce1de

Browse filesBrowse files
authored
Merge pull request #19087 from jklymak/fix-recursively-remove-ticks
FIX/TST: recursively remove ticks
2 parents a022490 + c0a31f0 commit c1ce1de
Copy full SHA for c1ce1de

File tree

Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed

‎lib/matplotlib/testing/decorators.py

Copy file name to clipboardExpand all lines: lib/matplotlib/testing/decorators.py
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ def _checked_on_freetype_version(required_freetype_version):
111111
def remove_ticks_and_titles(figure):
112112
figure.suptitle("")
113113
null_formatter = ticker.NullFormatter()
114-
for ax in figure.get_axes():
114+
def remove_ticks(ax):
115+
"""Remove ticks in *ax* and all its child Axes."""
115116
ax.set_title("")
116117
ax.xaxis.set_major_formatter(null_formatter)
117118
ax.xaxis.set_minor_formatter(null_formatter)
@@ -122,6 +123,10 @@ def remove_ticks_and_titles(figure):
122123
ax.zaxis.set_minor_formatter(null_formatter)
123124
except AttributeError:
124125
pass
126+
for child in ax.child_axes:
127+
remove_ticks(child)
128+
for ax in figure.get_axes():
129+
remove_ticks(ax)
125130

126131

127132
def _raise_on_image_difference(expected, actual, tol):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.