Skip to content

Commit

Permalink
Allowed nesting of GridSpace types in bokeh LayoutPlot
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Feb 6, 2017
1 parent bf71bc3 commit aedd0f0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions holoviews/plotting/bokeh/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ def sync_tools(self, subplots):

def initialize_plot(self, ranges=None, plots=[]):
ranges = self.compute_ranges(self.layout, self.keys[-1], None)
plots = [[] for r in range(self.cols)]
passed_plots = list(plots)
plots = [[] for r in range(self.cols)]
for i, coord in enumerate(self.layout.keys(full_grid=True)):
r = i % self.cols
subplot = self.subplots.get(wrap_tuple(coord), None)
Expand Down Expand Up @@ -421,8 +421,6 @@ def _create_subplots(self, layout, positions, layout_dimensions, ranges, num=0):

subplot_opts = dict(adjoined=main_plot)
# Options common for any subplot
if type(element) in (NdLayout, Layout):
raise SkipRendering("Cannot plot nested Layouts.")
vtype = element.type if isinstance(element, HoloMap) else element.__class__
plot_type = Store.registry[self.renderer.backend].get(vtype, None)
plotopts = self.lookup_options(element, 'plot').options
Expand Down Expand Up @@ -468,10 +466,10 @@ def _create_subplots(self, layout, positions, layout_dimensions, ranges, num=0):
return subplots, adjoint_clone


def initialize_plot(self, ranges=None):
def initialize_plot(self, plots=None, ranges=None):
ranges = self.compute_ranges(self.layout, self.keys[-1], None)
passed_plots = [] if plots is None else plots
plots = [[] for _ in range(self.rows)]
passed_plots = []
tab_titles = {}
insert_rows, insert_cols = [], []
adjoined = False
Expand Down

0 comments on commit aedd0f0

Please sign in to comment.