def plot(self, experiment, plot_name=None, **kwargs): if self.plotfacet and plot_name: experiment = experiment.subset(self.plotfacet, plot_name) Kde1DView.plot(self, experiment, **kwargs) if self.plotfacet and plot_name is not None: plt.title("{0} = {1}".format(self.plotfacet, plot_name))
def plot(self, experiment, plot_name=None, **kwargs): if experiment is None: raise util.CytoflowViewError("No experiment specified") if self.plotfacet and plot_name is not None: experiment = experiment.subset(self.plotfacet, plot_name) Kde1DView.plot(self, experiment, **kwargs) if self.plotfacet and plot_name is not None: plt.title("{0} = {1}".format(self.plotfacet, plot_name))
def get_notebook_code(self, idx): view = Kde1DView() view.copy_traits(self, view.copyable_trait_names()) plot_params_str = traits_str(self.plot_params) return dedent(""" {repr}.plot(ex_{idx}{plot}{plot_params}) """ .format(repr = repr(view), idx = idx, plot = ", plot_name = " + repr(self.current_plot) if self.plot_names else "", plot_params = ", " + plot_params_str if plot_params_str else ""))