Skip to content
forked from pydata/xarray

Commit

Permalink
More accurate error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Oct 2, 2018
1 parent 2088934 commit 2888724
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xarray/plot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,16 @@ def _determine_cmap_params(plot_data, vmin=None, vmax=None, cmap=None,
norm.vmin = vmin
else:
if not vmin_was_none and vmin != norm.vmin:
raise ValueError('Cannot supply vmin and a norm with vmin.')
raise ValueError('Cannot supply vmin and a norm'
+ ' with a different vmin.')
vmin = norm.vmin

if norm.vmax is None:
norm.vmax = vmax
else:
if not vmax_was_none and vmax != norm.vmax:
raise ValueError('Cannot supply vmax and a norm with vmax.')
raise ValueError('Cannot supply vmax and a norm'
+ ' with a different vmax.')
vmax = norm.vmax

# if BoundaryNorm, then set levels
Expand Down

0 comments on commit 2888724

Please sign in to comment.