Skip to content

Commit

Permalink
Update more error messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Mar 6, 2019
1 parent cffaf44 commit 8cd8722
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions xarray/plot/dataset_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ def _infer_meta_data(ds, x, y, hue, hue_style, add_guide):
add_colorbar = False

if hue_style is not None and hue_style not in ['discrete', 'continuous']:
raise ValueError('hue_style must be either None, \'discrete\' '
'or \'continuous\'.')
raise ValueError("hue_style must be either None, 'discrete' "
"or 'continuous'.")

if hue:
hue_label = label_from_attrs(ds[hue])
Expand Down
4 changes: 2 additions & 2 deletions xarray/plot/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def _infer_line_data(darray, x, y, hue):
xplt = xplt.transpose(otherdim, huename)
else:
raise ValueError('For 2D inputs, hue must be a dimension'
+ ' i.e. one of ' + repr(darray.dims))
' i.e. one of ' + repr(darray.dims))

else:
yplt = darray.transpose(xname, huename)
Expand All @@ -83,7 +83,7 @@ def _infer_line_data(darray, x, y, hue):
xplt = darray.transpose(otherdim, huename)
else:
raise ValueError('For 2D inputs, hue must be a dimension'
+ ' i.e. one of ' + repr(darray.dims))
' i.e. one of ' + repr(darray.dims))

else:
xplt = darray.transpose(yname, huename)
Expand Down

0 comments on commit 8cd8722

Please sign in to comment.