()
| 240 | |
| 241 | @image_comparison(['function_scales.png'], remove_text=True, style='mpl20') |
| 242 | def 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 | |
| 258 | def test_pass_scale(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…