def __init__(self, layout, **params): super().__init__(layout, **params) self.layout, self.subplots, self.paths = self._init_layout(layout) if self.top_level: self.traverse(lambda x: attach_streams(self, x.hmap, 2), [GenericElementPlot])
def __init__(self, layout, **params): super(LayoutPlot, self).__init__(layout, **params) self.layout, self.subplots, self.paths = self._init_layout(layout) if self.top_level: self.comm = self.init_comm() self.traverse(lambda x: setattr(x, 'comm', self.comm)) self.traverse(lambda x: attach_streams(self, x.hmap, 2), [GenericElementPlot])
def __init__(self, layout, ranges=None, layout_num=1, **params): if not isinstance(layout, GridSpace): raise Exception("GridPlot only accepts GridSpace.") super().__init__(layout=layout, layout_num=layout_num, ranges=ranges, **params) self.cols, self.rows = layout.shape self.subplots, self.layout = self._create_subplots(layout, ranges) if self.top_level: self.traverse(lambda x: attach_streams(self, x.hmap, 2), [GenericElementPlot])
def __init__(self, layout, ranges=None, layout_num=1, **params): if not isinstance(layout, GridSpace): raise Exception("GridPlot only accepts GridSpace.") super(GridPlot, self).__init__(layout=layout, layout_num=layout_num, ranges=ranges, **params) self.cols, self.rows = layout.shape self.subplots, self.layout = self._create_subplots(layout, ranges) if self.top_level: self.comm = self.init_comm() self.traverse(lambda x: setattr(x, 'comm', self.comm)) self.traverse(lambda x: attach_streams(self, x.hmap, 2), [GenericElementPlot])