def plot(self): if not utils.does_figure_object_exists(self.figure): self.create_figure() self.create_axis() data = self.data_function() if self.auto_contrast is True: self.optimize_contrast(data) self.update_image() if self.plot_scale_bar is True: if self.pixel_size is not None: self.ax.scale_bar = widgets.Scale_Bar( ax = self.ax, units = self.pixel_units, pixel_size = self.pixel_size) # Adjust the size of the window #size = [ 6, 6.* data.shape[0] / data.shape[1]] #self.figure.set_size_inches(size, forward = True) self.figure.canvas.draw() self.connect()
def is_active(self): return utils.does_figure_object_exists(self.image_plot.figure)
def close(self): for line in self.ax_lines + self.right_ax_lines: line.close() if utils.does_figure_object_exists(self.figure): plt.close(self.figure)
def close(self): if utils.does_figure_object_exists(self.figure) is True: plt.close(self.figure)
def is_active(self): return utils.does_figure_object_exists(self.spectrum_plot.figure)
def close(self): for line in self.left_ax_lines + self.right_ax_lines: line.close() if utils.does_figure_object_exists(self.figure): plt.close(self.figure)