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

Function test_collection

lib/matplotlib/tests/test_patheffects.py:125–136  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

123
124@image_comparison(['collection'], tol=0.032, style='mpl20')
125def test_collection():
126 x, y = np.meshgrid(np.linspace(0, 10, 150), np.linspace(-5, 5, 100))
127 data = np.sin(x) + np.cos(y)
128 cs = plt.contour(data)
129 cs.set(path_effects=[
130 path_effects.PathPatchEffect(edgecolor='black', facecolor='none', linewidth=12),
131 path_effects.Stroke(linewidth=5)])
132 for text in plt.clabel(cs, colors='white'):
133 text.set_path_effects([path_effects.withStroke(foreground='k',
134 linewidth=3)])
135 text.set_bbox({'boxstyle': 'sawtooth', 'facecolor': 'none',
136 'edgecolor': 'blue'})
137
138
139@image_comparison(['tickedstroke.png'], remove_text=True, style='mpl20')

Callers

nothing calls this directly

Calls 5

set_path_effectsMethod · 0.80
set_bboxMethod · 0.80
contourMethod · 0.45
setMethod · 0.45
clabelMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…