def get_notebook_code(self, idx): view = KMeans2DView() view.copy_traits(self, view.copyable_trait_names()) view.subset = self.subset plot_params_str = traits_str(self.plot_params) return dedent(""" op_{idx}.default_view({traits}).plot(ex_{idx}{plot_params}) """.format(traits=traits_str(view), idx=idx, plot_params=", " + plot_params_str if plot_params_str else ""))
def get_notebook_code(self, idx): view = ThresholdSelection() view.copy_traits(self, view.copyable_trait_names()) plot_params_str = traits_str(self.plot_params) return dedent(""" op_{idx}.default_view({traits}).plot(ex_{prev_idx}{plot_params}) """.format(idx=idx, traits=traits_str(view), prev_idx=idx - 1, plot_params=", " + plot_params_str if plot_params_str else ""))
def get_notebook_code(self, idx): view = BinningView() view.copy_traits(self, view.copyable_trait_names()) return dedent(""" op_{idx}.default_view({traits}).plot(ex_{idx}) """.format(idx=idx, traits=traits_str(view)))
def get_notebook_code(self, idx): view = RangeSelection() view.copy_traits(self, view.copyable_trait_names()) return dedent(""" op_{idx}.default_view({traits}).plot(ex_{prev_idx}) """.format(idx=idx, traits=traits_str(view), prev_idx=idx - 1))
def get_notebook_code(self, idx): view = BeadCalibrationDiagnostic() view.copy_traits(self, view.copyable_trait_names()) return dedent(""" op_{idx}.default_view({traits}).plot(ex_{prev_idx}) """.format(traits=traits_str(view), idx=idx, prev_idx=idx - 1))
def get_notebook_code(self, idx): view = FlowPeaks2DView() view.copy_traits(self, view.copyable_trait_names()) view.subset = self.subset if self.show_density: plot_params_str = traits_str(self.density_plot_params) else: plot_params_str = traits_str(self.scatterplot_plot_params) return dedent(""" op_{idx}.default_view({traits}).plot(ex_{idx}{plot_params}) """.format(traits=traits_str(view), idx=idx, plot_params=", " + plot_params_str if plot_params_str else ""))
def get_notebook_code(self, idx): view = GaussianMixture1DView() view.copy_traits(self, view.copyable_trait_names()) view.subset = self.subset return dedent(""" op_{idx}.default_view({traits}).plot(ex_{idx}) """.format(traits=traits_str(view), idx=idx))
def get_notebook_code(self, idx): view = BleedthroughPiecewiseDiagnostic() view.copy_traits(self, view.copyable_trait_names()) view.subset = self.subset return dedent(""" op_{idx}.default_view({traits}).plot(ex_{prev_idx}) """.format(traits=traits_str(view), idx=idx, prev_idx=idx - 1))
def get_notebook_code(self, idx): view = ScatterplotView() 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 ""))
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 ""))