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

Function test_contour_manual_labels

lib/matplotlib/tests/test_contour.py:99–109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

97
98@image_comparison(['contour_manual_labels'], remove_text=True, style='mpl20')
99def test_contour_manual_labels():
100 x, y = np.meshgrid(np.arange(0, 10), np.arange(0, 10))
101 z = np.max(np.dstack([abs(x), abs(y)]), 2)
102
103 plt.figure(figsize=(6, 2), dpi=200)
104 cs = plt.contour(x, y, z)
105
106 pts = np.array([(1.0, 3.0), (1.0, 4.4), (1.0, 6.0)])
107 plt.clabel(cs, manual=pts)
108 pts = np.array([(2.0, 3.0), (2.0, 4.4), (2.0, 6.0)])
109 plt.clabel(cs, manual=pts, fontsize='small', colors=('r', 'g'))
110
111
112def test_contour_manual_moveto():

Callers

nothing calls this directly

Calls 4

maxMethod · 0.80
figureMethod · 0.80
contourMethod · 0.45
clabelMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…