我无法在轴上画一条水平线。我在轴上做了一个点,但我不知道如何从该点在 x 或 y 轴上画一条线,甚至不知道如何在两点之间画出距离。知道怎么做吗?
from manimlib.imports import *
class GraphX(GraphScene):
CONFIG ={
'x_min': -4,
'x_max': 4,
'y_min': -2,
'y_max': 2,
'x_axis_label': '$x$',
'y_axis_label': '$y$',
'graph_origin': 0.5 * DOWN + 0 * LEFT,
}
def show_function_graph(self):
self.setup_axes(animate = True)
text = TextMobject('(x,y)')
text.shift(2*UP+3*RIGHT)
self.play(Write(text))
self.wait(3)
def construct(self):
self.show_function_graph()