File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -693,7 +693,7 @@ def newplotfunc(
693
693
dims = yx_dims + tuple (d for d in darray .dims if d not in yx_dims )
694
694
if dims != darray .dims :
695
695
darray = darray .transpose (* dims , transpose_coords = True )
696
- elif xval . shape [- 1 ] == darray .shape [0 ]:
696
+ elif darray [ xlab ]. dims [- 1 ] == darray .dims [0 ]:
697
697
darray = darray .transpose (transpose_coords = True )
698
698
699
699
# Pass the data as a masked ndarray too
Original file line number Diff line number Diff line change @@ -2167,4 +2167,4 @@ def test_plot_transposed_nondim_coord(plotfunc):
2167
2167
def test_plot_transposes_properly ():
2168
2168
da = xr .DataArray ([np .sin (2 * np .pi / 10 * np .arange (10 ))] * 10 , dims = ("y" , "x" ))
2169
2169
hdl = da .plot (x = "x" , y = "y" )
2170
- np .all (hdl .get_array () == da .to_masked_array ().ravel ())
2170
+ assert np .all (hdl .get_array () == da .to_masked_array ().ravel ())
You can’t perform that action at this time.
0 commit comments