diff --git a/xarray/plot/plot.py b/xarray/plot/plot.py index f0cf356fc5d..5911a24e29a 100644 --- a/xarray/plot/plot.py +++ b/xarray/plot/plot.py @@ -606,8 +606,7 @@ def newplotfunc(darray, x=None, y=None, figsize=None, size=None, cbar = _add_colorbar(primitive, ax, cbar_ax, cbar_kwargs, cmap_params) - elif (cbar_ax is not None - or (cbar_kwargs is not None and cbar_kwargs != {})): + elif (cbar_ax is not None or cbar_kwargs): # inform the user about keywords which aren't used raise ValueError("cbar_ax and cbar_kwargs can't be used with " "add_colorbar=False.")