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

Function test_contour_colorbar

lib/matplotlib/tests/test_colorbar.py:237–244  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

235@image_comparison(['contour_colorbar.png'], remove_text=True, style='_classic_test',
236 tol=0 if platform.machine() == 'x86_64' else 0.054)
237def test_contour_colorbar():
238 fig, ax = plt.subplots(figsize=(4, 2))
239 data = np.arange(1200).reshape(30, 40) - 500
240 levels = np.array([0, 200, 400, 600, 800, 1000, 1200]) - 500
241
242 CS = ax.contour(data, levels=levels, extend='both')
243 fig.colorbar(CS, orientation='horizontal', extend='both')
244 fig.colorbar(CS, orientation='vertical')
245
246
247@image_comparison(['cbar_with_subplots_adjust.png'], remove_text=True,

Callers

nothing calls this directly

Calls 3

subplotsMethod · 0.45
contourMethod · 0.45
colorbarMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…