def __init__(self, x_min=0, x_max=6, y_min=0.5, y_max=3.8): xs = np.array([0.0, 2.0, 3.0, 4.0, 5.0, 6.0]) ys = np.array([0.5, 3.5, 3.8, 2, 2.5, 3.5]) # Scale x and y xs = _scale_array(x_min, x_max, xs) ys = _scale_array(y_min, y_max, ys) points = Point.from_coordinate_lists(xs, ys) super().__init__(points) self.style.line_color = Style.Color.BLACK
def __init__(self, name_pos="start", x_min=0, x_max=6, y_min=0.5, y_max=1.8): xs = np.array([0, 2, 3, 4, 5, 6]) ys = np.array([1.5, 1.3, 0.7, 0.5, 0.6, 0.8]) # Scale x and y xs = _scale_array(x_min, x_max, xs) ys = _scale_array(y_min, y_max, ys) points = Point.from_coordinate_lists(xs, ys) super().__init__(points)
def __init__(self, name=None, name_pos="start", x_min=0, x_max=6, y_min=0, y_max=2): xs = np.array([0.0, 2.0, 3.0, 4.0, 5.0, 6.0]) ys = np.array([1, 1.8, 1.2, 0.7, 0.8, 0.85]) xs = _scale_array(x_min, x_max, xs) ys = _scale_array(y_min, y_max, ys) points = Point.from_coordinate_lists(xs, ys) super().__init__(points)
def __init__(self, x_min=0, x_max=2.25, y_min=0.046679703125, y_max=1.259375): a = 0 b = 2.25 resolution = 100 xs = np.linspace(a, b, resolution + 1) ys = self.__call__(xs) # Scale x and y xs = _scale_array(x_min, x_max, xs) ys = _scale_array(y_min, y_max, ys) points = Point.from_coordinate_lists(xs, ys) super().__init__(points)
def scale(self, factor: float) -> "Curve": """Scale all coordinates by `factor`: ``x = factor*x``, etc.""" ret_curve = Curve( Point.from_coordinate_lists(factor * self.xs, factor * self.ys)) ret_curve.style = self.style return ret_curve