MCPcopy
hub / github.com/matplotlib/matplotlib / demo

Function demo

galleries/users_explain/colors/colors.py:155–163  ·  view source on GitHub ↗
(sty)

Source from the content-addressed store, hash-verified

153
154
155def demo(sty):
156 mpl.style.use(sty)
157 fig, ax = plt.subplots(figsize=(3, 3))
158
159 ax.set_title(f'style: {sty!r}', color='C0')
160
161 ax.plot(th, np.cos(th), 'C1', label='C1')
162 ax.plot(th, np.sin(th), 'C2', label='C2')
163 ax.legend()
164
165
166demo('default')

Callers 1

colors.pyFile · 0.70

Calls 4

subplotsMethod · 0.45
set_titleMethod · 0.45
plotMethod · 0.45
legendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…