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