Skip to content

Commit

Permalink
Handle by argument for gridded types (#461)
Browse files Browse the repository at this point in the history
* Handle by argument for gridded types

* Fixed bug
  • Loading branch information
philippjfr authored May 1, 2020
1 parent 12f291e commit b3cbb51
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hvplot/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,8 @@ def __call__(self, kind, x, y):
zs = self.kwds.get('z', [])
if not isinstance(zs, list): zs = [zs]
groups += self.grid
if self.gridded and not kind == 'points':
groups += self.by
if groups or len(zs) > 1:
if self.streaming:
raise NotImplementedError("Streaming and groupby not yet implemented")
Expand Down Expand Up @@ -983,6 +985,9 @@ def method_wrapper(ds, x, y):
kdims=dimensions)
else:
obj = method(x, y, data=dataset.data)

if self.gridded and self.by and not kind == 'points':
obj = obj.layout(self.by) if self.subplots else obj.overlay(self.by)
if self.grid:
obj = obj.grid(self.grid).opts(shared_xaxis=True, shared_yaxis=True)
else:
Expand Down

0 comments on commit b3cbb51

Please sign in to comment.