Skip to content

Commit

Permalink
Correctly set batched plot options
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Jul 3, 2016
1 parent 6943b97 commit 4971b5f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions holoviews/plotting/plot.py
Expand Up @@ -503,18 +503,24 @@ def __init__(self, element, keys=None, ranges=None, dimensions=None,
kdims=['Frame'], id=element.id)
else:
self.hmap = element
self.style = self.lookup_options(self.hmap.last, 'style') if style is None else style
if self.batched:
plot_element = self.hmap.last.last
else:
plot_element = self.hmap.last

self.style = self.lookup_options(plot_element, 'style') if style is None else style
dimensions = self.hmap.kdims if dimensions is None else dimensions
keys = keys if keys else list(self.hmap.data.keys())
plot_opts = self.lookup_options(self.hmap.last, 'plot').options
plot_opts = self.lookup_options(plot_element, 'plot').options

dynamic = False if not isinstance(element, DynamicMap) or element.sampled else element.mode
super(GenericElementPlot, self).__init__(keys=keys, dimensions=dimensions,
dynamic=dynamic,
**dict(params, **plot_opts))
if self.batched:
self.ordering = util.layer_sort(self.hmap)
self.style = self.lookup_options(self.hmap.last.last, 'style').max_cycles(len(self.ordering))
self.set_param(**self.lookup_options(self.hmap.last, 'plot').options)
self.style = self.lookup_options(plot_element, 'style').max_cycles(len(self.ordering))
else:
self.ordering = []

Expand Down

0 comments on commit 4971b5f

Please sign in to comment.