()
| 65 | |
| 66 | |
| 67 | def test_contour_no_valid_levels(): |
| 68 | fig, ax = plt.subplots() |
| 69 | # no warning for empty levels. |
| 70 | ax.contour(np.random.rand(9, 9), levels=[]) |
| 71 | # no warning if levels is given and is not within the range of z. |
| 72 | cs = ax.contour(np.arange(81).reshape((9, 9)), levels=[100]) |
| 73 | # ... and if fmt is given. |
| 74 | ax.clabel(cs, fmt={100: '%1.2f'}) |
| 75 | # no warning if z is uniform. |
| 76 | ax.contour(np.ones((9, 9))) |
| 77 | |
| 78 | |
| 79 | def test_contour_Nlevels(): |