MCPcopy
hub / github.com/matplotlib/matplotlib / test_function_scale

Function test_function_scale

lib/matplotlib/tests/test_scale.py:242–255  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

240
241@image_comparison(['function_scales.png'], remove_text=True, style='mpl20')
242def test_function_scale():
243 def inverse(x):
244 return x**2
245
246 def forward(x):
247 return x**(1/2)
248
249 fig, ax = plt.subplots()
250
251 x = np.arange(1, 1000)
252
253 ax.plot(x, x)
254 ax.set_xscale('function', functions=(forward, inverse))
255 ax.set_xlim(1, 1000)
256
257
258def test_pass_scale():

Callers

nothing calls this directly

Calls 4

set_xscaleMethod · 0.80
subplotsMethod · 0.45
plotMethod · 0.45
set_xlimMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…