Skip to content

Commit

Permalink
fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Dec 15, 2018
1 parent 0d2b126 commit a938d24
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion xarray/plot/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -831,9 +831,9 @@ def newplotfunc(darray, x=None, y=None, figsize=None, size=None,
ax.set_title(darray._title_for_slice())

if add_colorbar:
cbar_kwargs = {} if cbar_kwargs is None else dict(cbar_kwargs)
if add_labels and 'label' not in cbar_kwargs:
cbar_kwargs['label'] = label_from_attrs(darray)

cbar = _add_colorbar(primitive, ax, cbar_ax, cbar_kwargs,
cmap_params)

Expand Down
1 change: 0 additions & 1 deletion xarray/plot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,6 @@ def _ensure_numeric(arr):

def _add_colorbar(primitive, ax, cbar_ax, cbar_kwargs, cmap_params):
plt = import_matplotlib_pyplot()
cbar_kwargs = {} if cbar_kwargs is None else dict(cbar_kwargs)
cbar_kwargs.setdefault('extend', cmap_params['extend'])
if cbar_ax is None:
cbar_kwargs.setdefault('ax', ax)
Expand Down

0 comments on commit a938d24

Please sign in to comment.