MCPcopy
hub / github.com/matplotlib/matplotlib / test_logit_scales

Function test_logit_scales

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

Source from the content-addressed store, hash-verified

105
106@image_comparison(['logit_scales.png'], remove_text=True, style='_classic_test')
107def test_logit_scales():
108 fig, ax = plt.subplots()
109
110 # Typical extinction curve for logit
111 x = np.array([0.001, 0.003, 0.01, 0.03, 0.1, 0.2, 0.3, 0.4, 0.5,
112 0.6, 0.7, 0.8, 0.9, 0.97, 0.99, 0.997, 0.999])
113 y = 1.0 / x
114
115 ax.plot(x, y)
116 ax.set_xscale('logit')
117 ax.grid(True)
118 bbox = ax.get_tightbbox(fig.canvas.get_renderer())
119 assert np.isfinite(bbox.x0)
120 assert np.isfinite(bbox.y0)
121
122
123def test_log_scatter():

Callers

nothing calls this directly

Calls 6

set_xscaleMethod · 0.80
subplotsMethod · 0.45
plotMethod · 0.45
gridMethod · 0.45
get_tightbboxMethod · 0.45
get_rendererMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…