在PowerShell运行程序时报错
line1_lable = Axes.get_graph_lable(line1_graph,"\\y=4/3x+4")
AttributeError: type object 'Axes' has no attribute 'get_graph_lable'
代码如下
from manimlib import *
class axes(Scene):
def construct(self):
axes = Axes(
x_range=(-1,10,1),
y_range=(-1,8,1),
hight=7,
width=7,
axis_config={
"stroke_color": WHITE,
"stroke_width": 2,
},
)
axes.add_coordinate_labels()
line1_graph = axes.get_graph(
lambda x: -4/3*x+4,
color=BLUE,
)
line2_graph = axes.get_graph(
lambda x: 3/4*x,
color=YELLOW,
)
dot = Dot(color=RED_E)
dot.move_to(axes.c2p(1.92,1.44))
line1_lable = Axes.get_graph_lable(line1_graph,"\\y=4/3x+4")
line2_lable = Axes.get_graph_lable(line2_graph,"\\y=3/4x")
dot_lable = Axes.get_graph_lable(dot,"\\(1.92,1.44)")
h_line = always_redraw(lambda:axes.get_h_line(dot.get_left()))
v_line = always_redraw(lambda:axes.get_v_line(dot.get_bottom()))
self.play(Write(axes, lag_ratio=0.01, runtime=1))
self.play(
ShowCreation(line1_graph),
ShowCreation(line2_graph),
)
self.play(FadeIn(dot,scale=0.1))
self.play(
ShowCreation(h_line),
ShowCreation(v_line),
)
self.wait()
请问如何解决