(plotfunc)
| 3232 | @requires_matplotlib |
| 3233 | @pytest.mark.parametrize("plotfunc", ["pcolormesh", "contourf", "contour"]) |
| 3234 | def test_plot_transposed_nondim_coord(plotfunc) -> None: |
| 3235 | x = np.linspace(0, 10, 101) |
| 3236 | h = np.linspace(3, 7, 101) |
| 3237 | s = np.linspace(0, 1, 51) |
| 3238 | z = s[:, np.newaxis] * h[np.newaxis, :] |
| 3239 | da = xr.DataArray( |
| 3240 | np.sin(x) * np.cos(z), |
| 3241 | dims=["s", "x"], |
| 3242 | coords={"x": x, "s": s, "z": (("s", "x"), z), "zt": (("x", "s"), z.T)}, |
| 3243 | ) |
| 3244 | with figure_context(): |
| 3245 | getattr(da.plot, plotfunc)(x="x", y="zt") |
| 3246 | with figure_context(): |
| 3247 | getattr(da.plot, plotfunc)(x="zt", y="x") |
| 3248 | |
| 3249 | |
| 3250 | @requires_matplotlib |
nothing calls this directly
no test coverage detected
searching dependent graphs…