MCPcopy Index your code
hub / github.com/matplotlib/cheatsheets / setup

Function setup

scripts/tick-locators.py:17–29  ·  view source on GitHub ↗
(ax)

Source from the content-addressed store, hash-verified

15
16# Setup a plot such that only the bottom spine is shown
17def setup(ax):
18 ax.spines['right'].set_color('none')
19 ax.spines['left'].set_color('none')
20 ax.yaxis.set_major_locator(ticker.NullLocator())
21 ax.spines['top'].set_color('none')
22 ax.xaxis.set_ticks_position('bottom')
23 ax.tick_params(which='major', width=1.00)
24 ax.tick_params(which='major', length=5)
25 ax.tick_params(which='minor', width=0.75)
26 ax.tick_params(which='minor', length=2.5)
27 ax.set_xlim(0, 5)
28 ax.set_ylim(0, 1)
29 ax.patch.set_alpha(0.0)
30
31
32fig = plt.figure(figsize=(8, 5))

Callers 1

tick-locators.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected