Skip to content
forked from pydata/xarray

Commit

Permalink
Test to make sure transpose is right
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Nov 13, 2019
1 parent 9b35ecf commit c9cc698
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions xarray/tests/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2162,3 +2162,9 @@ def test_plot_transposed_nondim_coord(plotfunc):
)
getattr(da.plot, plotfunc)(x="x", y="zt")
getattr(da.plot, plotfunc)(x="zt", y="x")


def test_plot_transposes_properly():
da = xr.DataArray([np.sin(2 * np.pi / 10 * np.arange(10))] * 10, dims=("y", "x"))
hdl = da.plot(x="x", y="y")
np.all(hdl.get_array() == da.to_masked_array().ravel())

0 comments on commit c9cc698

Please sign in to comment.