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

Function test_plot_masked_units

lib/matplotlib/tests/test_units.py:112–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

110@image_comparison(['plot_masked_units.png'], remove_text=True, style='mpl20',
111 tol=0 if platform.machine() == 'x86_64' else 0.02)
112def test_plot_masked_units():
113 data = np.linspace(-5, 5)
114 data_masked = np.ma.array(data, mask=(data > -2) & (data < 2))
115 data_masked_units = Quantity(data_masked, 'meters')
116
117 fig, ax = plt.subplots()
118 ax.plot(data_masked_units)
119
120
121def test_empty_set_limits_with_units(quantity_converter):

Callers

nothing calls this directly

Calls 3

QuantityClass · 0.85
subplotsMethod · 0.45
plotMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…