Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for initialization of overlays returned from DynamicMaps #492

Merged
merged 1 commit into from
Feb 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion holoviews/plotting/bokeh/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
mpl = None
import param

from ...core import Store, HoloMap, Overlay, DynamicMap
from ...core import Store, HoloMap, Overlay, DynamicMap, CompositeOverlay
from ...core import util
from ...element import RGB
from ..plot import GenericElementPlot, GenericOverlayPlot
Expand Down Expand Up @@ -686,6 +686,7 @@ def _init_tools(self, element):

def initialize_plot(self, ranges=None, plot=None, plots=None):
key = self.keys[-1]
element = self._get_frame(key)
ranges = self.compute_ranges(self.hmap, key, ranges)
if plot is None and not self.tabs:
plot = self._init_plot(key, ranges=ranges, plots=plots)
Expand All @@ -705,6 +706,9 @@ def initialize_plot(self, ranges=None, plot=None, plots=None):
title = ', '.join([d.pprint_value_string(k) for d, k in
zip(self.hmap.last.kdims, key)])
panels.append(Panel(child=child, title=title))
if isinstance(element, CompositeOverlay):
frame = element.get(key, None)
subplot.current_frame = frame

if self.tabs:
self.handles['plot'] = Tabs(tabs=panels)
Expand Down
7 changes: 5 additions & 2 deletions holoviews/plotting/mpl/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,11 @@ def initialize_plot(self, ranges=None):
element = self._get_frame(key)

ranges = self.compute_ranges(self.hmap, key, ranges)
for plot in self.subplots.values():
plot.initialize_plot(ranges=ranges)
for k, subplot in self.subplots.items():
subplot.initialize_plot(ranges=ranges)
if isinstance(element, CompositeOverlay):
frame = element.get(k, None)
subplot.current_frame = frame

if self.show_legend:
self._adjust_legend(element, axis)
Expand Down