Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
yohai committed Jul 11, 2018
1 parent 31019d8 commit 1f3d49b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion xarray/plot/facetgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def map_dataarray_line(self, plotfunc, x=None, y=None, hue=None, **kwargs):
"""
from .plot import (_infer_line_data, _infer_scatter_data,
line, dataset_scatter)
line, dataset_scatter)

add_legend = kwargs.pop('add_legend', True)
kwargs['add_legend'] = False
Expand Down
11 changes: 7 additions & 4 deletions xarray/plot/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ def pcolormesh(x, y, z, ax, infer_intervals=None, **kwargs):

def dataset_scatter(ds, x=None, y=None, hue=None, col=None, row=None,
col_wrap=None, sharex=True, sharey=True, aspect=None,
size=None, subplot_kws=None, add_legend=True, **kwargs):
size=None, subplot_kws=None, add_legend=True, **kwargs):
if col or row:
ax = kwargs.pop('ax', None)
figsize = kwargs.pop('figsize', None)
Expand All @@ -996,14 +996,17 @@ def dataset_scatter(ds, x=None, y=None, hue=None, col=None, row=None,
if size is None:
size = 3
elif figsize is not None:
raise ValueError('cannot provide both `figsize` and `size` arguments')
raise ValueError('cannot provide both `figsize` and'
'`size` arguments')

g = FacetGrid(data=ds, col=col, row=row, col_wrap=col_wrap,
sharex=sharex, sharey=sharey, figsize=figsize,
aspect=aspect, size=size, subplot_kws=subplot_kws)
return g.map_dataarray_line(x=x, y=y, hue=hue, plotfunc=dataset_scatter, **kwargs)
return g.map_dataarray_line(x=x, y=y, hue=hue,
plotfunc=dataset_scatter, **kwargs)

xplt, yplt, hueplt, xlabel, ylabel, huelabel = _infer_scatter_data(ds, x, y, hue)
xplt, yplt, hueplt, xlabel, ylabel, huelabel = _infer_scatter_data(ds, x,
y, hue)

figsize = kwargs.pop('figsize', None)
ax = kwargs.pop('ax', None)
Expand Down

0 comments on commit 1f3d49b

Please sign in to comment.