MCPcopy
hub / github.com/matplotlib/matplotlib / setup

Function setup

galleries/users_explain/axes/axes_ticks.py:77–89  ·  view source on GitHub ↗

Set up common parameters for the Axes in the example.

(ax, title)

Source from the content-addressed store, hash-verified

75# %%
76
77def setup(ax, title):
78 """Set up common parameters for the Axes in the example."""
79 # only show the bottom spine
80 ax.yaxis.set_major_locator(ticker.NullLocator())
81 ax.spines[['left', 'right', 'top']].set_visible(False)
82
83 ax.xaxis.set_ticks_position('bottom')
84 ax.tick_params(which='major', width=1.00, length=5)
85 ax.tick_params(which='minor', width=0.75, length=2.5)
86 ax.set_xlim(0, 5)
87 ax.set_ylim(0, 1)
88 ax.text(0.0, 0.2, title, transform=ax.transAxes,
89 fontsize=14, fontname='Monospace', color='tab:blue')
90
91
92fig, axs = plt.subplots(8, 1, layout='constrained')

Callers 1

axes_ticks.pyFile · 0.70

Calls 8

set_minor_locatorMethod · 0.80
set_major_locatorMethod · 0.45
set_visibleMethod · 0.45
set_ticks_positionMethod · 0.45
tick_paramsMethod · 0.45
set_xlimMethod · 0.45
set_ylimMethod · 0.45
textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…