Skip to content

Commit c9cc698

Browse files
committed
Test to make sure transpose is right
1 parent 9b35ecf commit c9cc698

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

xarray/tests/test_plot.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2162,3 +2162,9 @@ def test_plot_transposed_nondim_coord(plotfunc):
21622162
)
21632163
getattr(da.plot, plotfunc)(x="x", y="zt")
21642164
getattr(da.plot, plotfunc)(x="zt", y="x")
2165+
2166+
2167+
def test_plot_transposes_properly():
2168+
da = xr.DataArray([np.sin(2 * np.pi / 10 * np.arange(10))] * 10, dims=("y", "x"))
2169+
hdl = da.plot(x="x", y="y")
2170+
np.all(hdl.get_array() == da.to_masked_array().ravel())

0 commit comments

Comments
 (0)