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) self.channels = [] self.scale = {} for channel in self.channels_list: self.channels.append(channel.channel) self.scale[channel.channel] = channel.scale RadvizView.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 = RadvizView() view.copy_traits(self, view.copyable_trait_names()) for channel in self.channels_list: view.channels.append(channel.channel) view.scale[channel.channel] = channel.scale 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 ""))