예제 #1
0
    def set_y_grid(self, minimum, maximum, step, scale=False):
        """
		Set the y grid parameters.

                Args:
		    minimum: the bottom-most value
		    maximum: the top-most value
		    step: the grid spacing
		    scale: true to scale the y grid
		"""
        self.lock()
        self.y_min = float(minimum)
        self.y_max = float(maximum)
        self.y_step = float(step)
        if scale:
            coeff, exp, prefix = common.get_si_components(
                max(abs(self.y_min), abs(self.y_max)))
            self.y_scalar = 10**(-exp)
            self.y_prefix = prefix
        else:
            self.y_scalar = 1.0
            self.y_prefix = ''
        for cache in self._gl_caches:
            cache.changed(True)
        self.unlock()
예제 #2
0
	def set_y_grid(self, minimum, maximum, step, scale=False):
		"""
		Set the y grid parameters.
		@param minimum the bottom-most value
		@param maximum the top-most value
		@param step the grid spacing
		@param scale true to scale the y grid
		"""
		self.lock()
		self.y_min = float(minimum)
		self.y_max = float(maximum)
		self.y_step = float(step)
		if scale:
			coeff, exp, prefix = common.get_si_components(max(abs(self.y_min), abs(self.y_max)))
			self.y_scalar = 10**(-exp)
			self.y_prefix = prefix
		else:
			self.y_scalar = 1.0
			self.y_prefix = ''
		for cache in self._gl_caches: cache.changed(True)
		self.unlock()
예제 #3
0
    def set_x_grid(self, minimum, maximum, step, scale=False):
        """
		Set the x grid parameters.
		@param minimum the left-most value
		@param maximum the right-most value
		@param step the grid spacing
		@param scale true to scale the x grid
		"""
        self.lock()
        self.x_min = float(minimum)
        self.x_max = float(maximum)
        self.x_step = float(step)
        if scale:
            coeff, exp, prefix = common.get_si_components(
                max(abs(self.x_min), abs(self.x_max)))
            self.x_scalar = 10**(-exp)
            self.x_prefix = prefix
        else:
            self.x_scalar = 1.0
            self.x_prefix = ''
        for cache in self._gl_caches:
            cache.changed(True)
        self.unlock()
예제 #4
0
	def set_x_grid(self, minimum, maximum, step, scale=False):
		"""
		Set the x grid parameters.

                Args:
		    minimum: the left-most value
		    maximum: the right-most value
		    step: the grid spacing
		    scale: true to scale the x grid
		"""
		self.lock()
		self.x_min = float(minimum)
		self.x_max = float(maximum)
		self.x_step = float(step)
		if scale:
			coeff, exp, prefix = common.get_si_components(max(abs(self.x_min), abs(self.x_max)))
			self.x_scalar = 10**(-exp)
			self.x_prefix = prefix
		else:
			self.x_scalar = 1.0
			self.x_prefix = ''
		for cache in self._gl_caches: cache.changed(True)
		self.unlock()