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

FIX/TST: recursively remove ticks #19087

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion 7 lib/matplotlib/testing/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ def _checked_on_freetype_version(required_freetype_version):
def remove_ticks_and_titles(figure):
figure.suptitle("")
null_formatter = ticker.NullFormatter()
for ax in figure.get_axes():
def remove_ticks(ax):
"""Remove ticks in *ax* and all its child Axes."""
ax.set_title("")
ax.xaxis.set_major_formatter(null_formatter)
ax.xaxis.set_minor_formatter(null_formatter)
Expand All @@ -122,6 +123,10 @@ def remove_ticks_and_titles(figure):
ax.zaxis.set_minor_formatter(null_formatter)
except AttributeError:
pass
for child in ax.child_axes:
remove_ticks(child)
for ax in figure.get_axes():
remove_ticks(ax)


def _raise_on_image_difference(expected, actual, tol):
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.