Пример #1
0
 def __init__(self, parent, min_padding=(0, 0, 0, 0)):
     plotter_base.__init__(self, parent)
     #setup grid cache
     self._grid_cache = self.new_gl_cache(self._draw_grid, 25)
     self.enable_grid_lines(True)
     #setup padding
     self.padding_top_min, self.padding_right_min, self.padding_bottom_min, self.padding_left_min = min_padding
     #store title and unit strings
     self.set_title('Title')
     self.set_x_label('X Label')
     self.set_y_label('Y Label')
     #init the grid to some value
     self.set_x_grid(-1, 1, 1)
     self.set_y_grid(-1, 1, 1)
     #setup point label cache
     self._point_label_cache = self.new_gl_cache(self._draw_point_label, 75)
     self.enable_point_label(False)
     self.enable_grid_aspect_ratio(False)
     self.set_point_label_coordinate(None)
     common.point_label_thread(self)
     #init grid plotter
     self.register_init(self._init_grid_plotter)
Пример #2
0
	def __init__(self, parent, min_padding=(0, 0, 0, 0)):
		plotter_base.__init__(self, parent)
		#setup grid cache
		self._grid_cache = self.new_gl_cache(self._draw_grid, 25)
		self.enable_grid_lines(True)
		#setup padding
		self.padding_top_min, self.padding_right_min, self.padding_bottom_min, self.padding_left_min = min_padding
		#store title and unit strings
		self.set_title('Title')
		self.set_x_label('X Label')
		self.set_y_label('Y Label')
		#init the grid to some value
		self.set_x_grid(-1, 1, 1)
		self.set_y_grid(-1, 1, 1)
		#setup point label cache
		self._point_label_cache = self.new_gl_cache(self._draw_point_label, 75)
		self.enable_point_label(False)
		self.enable_grid_aspect_ratio(False)
		self.set_point_label_coordinate(None)
		common.point_label_thread(self)
		#init grid plotter
		self.register_init(self._init_grid_plotter)