()
| 7522 | @image_comparison(["test_loglog_nonpos.png"], remove_text=True, style='mpl20', |
| 7523 | tol=0.029) |
| 7524 | def test_loglog_nonpos(): |
| 7525 | fig, axs = plt.subplots(3, 3) |
| 7526 | x = np.arange(1, 11) |
| 7527 | y = x**3 |
| 7528 | y[7] = -3. |
| 7529 | x[4] = -10 |
| 7530 | for (mcy, mcx), ax in zip(product(['mask', 'clip', ''], repeat=2), |
| 7531 | axs.flat): |
| 7532 | if mcx == mcy: |
| 7533 | if mcx: |
| 7534 | ax.loglog(x, y**3, lw=2, nonpositive=mcx) |
| 7535 | else: |
| 7536 | ax.loglog(x, y**3, lw=2) |
| 7537 | else: |
| 7538 | ax.loglog(x, y**3, lw=2) |
| 7539 | if mcx: |
| 7540 | ax.set_xscale("log", nonpositive=mcx) |
| 7541 | if mcy: |
| 7542 | ax.set_yscale("log", nonpositive=mcy) |
| 7543 | ax.set_yticks([1e3, 1e7]) # Backcompat tick selection. |
| 7544 | |
| 7545 | |
| 7546 | @mpl.style.context('default') |
nothing calls this directly
no test coverage detected
searching dependent graphs…