Skip to content

Commit f34ccb9

Browse files
committed
FIX/TST: recursively remove ticks
1 parent 440af79 commit f34ccb9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/matplotlib/testing/decorators.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ 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):
115115
ax.set_title("")
116116
ax.xaxis.set_major_formatter(null_formatter)
117117
ax.xaxis.set_minor_formatter(null_formatter)
@@ -122,6 +122,10 @@ def remove_ticks_and_titles(figure):
122122
ax.zaxis.set_minor_formatter(null_formatter)
123123
except AttributeError:
124124
pass
125+
for child in ax.child_axes:
126+
remove_ticks(child)
127+
for ax in figure.get_axes():
128+
remove_ticks(ax)
125129

126130

127131
def _raise_on_image_difference(expected, actual, tol):

0 commit comments

Comments
 (0)