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

Function adjust_spines

galleries/examples/spines/spines_dropped.py:12–20  ·  view source on GitHub ↗
(ax, visible_spines)

Source from the content-addressed store, hash-verified

10
11
12def adjust_spines(ax, visible_spines):
13 ax.label_outer(remove_inner_ticks=True)
14 ax.grid(color='0.9')
15
16 for loc, spine in ax.spines.items():
17 if loc in visible_spines:
18 spine.set_position(('outward', 10)) # outward by 10 points
19 else:
20 spine.set_visible(False)
21
22
23x = np.linspace(0, 2 * np.pi, 100)

Callers 1

spines_dropped.pyFile · 0.85

Calls 4

label_outerMethod · 0.80
gridMethod · 0.45
set_positionMethod · 0.45
set_visibleMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…