Skip to content
forked from pydata/xarray

Commit 2888724

Browse files
author
dcherian
committed
More accurate error message.
1 parent 2088934 commit 2888724

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

xarray/plot/utils.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,16 @@ def _determine_cmap_params(plot_data, vmin=None, vmax=None, cmap=None,
215215
norm.vmin = vmin
216216
else:
217217
if not vmin_was_none and vmin != norm.vmin:
218-
raise ValueError('Cannot supply vmin and a norm with vmin.')
218+
raise ValueError('Cannot supply vmin and a norm'
219+
+ ' with a different vmin.')
219220
vmin = norm.vmin
220221

221222
if norm.vmax is None:
222223
norm.vmax = vmax
223224
else:
224225
if not vmax_was_none and vmax != norm.vmax:
225-
raise ValueError('Cannot supply vmax and a norm with vmax.')
226+
raise ValueError('Cannot supply vmax and a norm'
227+
+ ' with a different vmax.')
226228
vmax = norm.vmax
227229

228230
# if BoundaryNorm, then set levels

0 commit comments

Comments
 (0)