Skip to content

Commit 50d139d

Browse files
author
dcherian
committed
more fixes.
1 parent 4792af8 commit 50d139d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

doc/whats-new.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ v0.11.0 (unreleased)
3333
Enhancements
3434
~~~~~~~~~~~~
3535

36-
- ``plot.line()`` can now accept multidimensional co-ordinate variables as input.
36+
- ``plot.line()`` can now accept multidimensional coordinate variables as input.
3737
`hue` must be a dimension in this case. (:issue:`2407`)
3838
By `Deepak Cherian <https://github.com/dcherian>`_.
3939

xarray/plot/plot.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,7 @@ def _infer_line_data(darray, x, y, hue):
243243
yplt = darray[yname]
244244
if yplt.ndim > 1:
245245
if huename in darray.dims:
246-
otherdim = darray.dims[
247-
np.mod(darray.dims.index(huename) + 1, 2)]
246+
otherindex = 1 if darray.dims.index(huename) == 0 else 0
248247
xplt = darray.transpose(otherdim, huename)
249248
else:
250249
raise ValueError('For 2D inputs, hue must a dimension' +

0 commit comments

Comments
 (0)