Exemple #1
0
 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()
Exemple #2
0
 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()
Exemple #3
0
 def is_active(self):
     return utils.does_figure_object_exists(self.image_plot.figure)
Exemple #4
0
 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)
Exemple #5
0
 def close(self):
     if utils.does_figure_object_exists(self.figure) is True:
         plt.close(self.figure)
Exemple #6
0
 def is_active(self):
     return utils.does_figure_object_exists(self.spectrum_plot.figure)
Exemple #7
0
 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)
Exemple #8
0
 def close(self):
     if utils.does_figure_object_exists(self.figure) is True:
         plt.close(self.figure)