MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / remove_ticks_and_titles

Function remove_ticks_and_titles

lib/matplotlib/testing/decorators.py:57–75  ·  view source on GitHub ↗
(figure)

Source from the content-addressed store, hash-verified

55
56
57def remove_ticks_and_titles(figure):
58 figure.suptitle("")
59 null_formatter = ticker.NullFormatter()
60 def remove_ticks(ax):
61 """Remove ticks in *ax* and all its child Axes."""
62 ax.set_title("")
63 ax.xaxis.set_major_formatter(null_formatter)
64 ax.xaxis.set_minor_formatter(null_formatter)
65 ax.yaxis.set_major_formatter(null_formatter)
66 ax.yaxis.set_minor_formatter(null_formatter)
67 try:
68 ax.zaxis.set_major_formatter(null_formatter)
69 ax.zaxis.set_minor_formatter(null_formatter)
70 except AttributeError:
71 pass
72 for child in ax.child_axes:
73 remove_ticks(child)
74 for ax in figure.get_axes():
75 remove_ticks(ax)
76
77
78@contextlib.contextmanager

Callers 8

test_gettightbboxFunction · 0.90
test_twin_logscaleFunction · 0.90
compareMethod · 0.85

Calls 2

remove_ticksFunction · 0.85
suptitleMethod · 0.80

Tested by 7

test_gettightbboxFunction · 0.72
test_twin_logscaleFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…