def __init__(self, base, axes, color='black', zorder=3, side=None, x_min=0.008, x_max=0.008, y_min=0.0025, y_max=0.0025): """ """ _BaseInteractor.__init__(self, base, axes, color=color) # # class initialization # # list of Boxmask markers self.markers = [] self.axes = axes self.mask = None self.is_inside = side # # connect the artist for the motion self.connect = self.base.connect # # when qmax is reached the selected line is reset # the its previous value self.qmax = min(self.base.data.xmax, self.base.data.xmin) # # Define the box limits self.xmin = -1 * 0.5 * min(math.fabs(self.base.data.xmax), math.fabs(self.base.data.xmin)) self.ymin = -1 * 0.5 * min(math.fabs(self.base.data.xmax), math.fabs(self.base.data.xmin)) self.xmax = 0.5 * min(math.fabs(self.base.data.xmax), math.fabs(self.base.data.xmin)) self.ymax = 0.5 * min(math.fabs(self.base.data.xmax), math.fabs(self.base.data.xmin)) # # center of the box self.center_x = 0.0002 self.center_y = 0.0003 # # Number of points on the plot self.nbins = 20 # # Define initial result the summation self.count = 0 self.error = 0 self.data = self.base.data # # Flag to determine if the current figure has moved # # set to False == no motion , set to True== motion self.has_move = False # # Create Box edges self.horizontal_lines = HorizontalDoubleLine(self, self.base.subplot, color='blue', zorder=zorder, y=self.ymax, x=self.xmax, center_x=self.center_x, center_y=self.center_y) self.horizontal_lines.qmax = self.qmax self.vertical_lines = VerticalDoubleLine(self, self.base.subplot, color='grey', zorder=zorder, y=self.ymax, x=self.xmax, center_x=self.center_x, center_y=self.center_y) self.vertical_lines.qmax = self.qmax self.center = PointInteractor(self, self.base.subplot, color='grey', zorder=zorder, center_x=self.center_x, center_y=self.center_y) # # Save the name of the slicer panel associate with this slicer self.panel_name = "" # # Update and post slicer parameters self.update() self._post_data()