I am just beginning my foray into Manim and have it installed correctly (community version) and have run some sample programs. One of the things I want to do is to change the thickness of lines used in a graph. I was able to change the thickness of the function being plotted using graph.set_stroke(width=1), but I can't figure out how to change the thickness of the axes. Any thoughts would be appreciated. (P.S. I am not an expert programmer.)
I tried using stroke_width=1 within the CreateGraph(GraphScene) class, and although it didn't cause an error, it also didn't work.
Here is the code:
from manim import *
class CreateGraph(GraphScene):
def __init__(self, **kwargs):
GraphScene.__init__(
self,
x_min=-3,
x_max=3,
y_min=-5,
y_max=5,
graph_origin=ORIGIN,
axes_color=BLUE,
stroke_width=1
)
def construct(self):
# Create Graph
self.setup_axes(animate=True)
graph = self.get_graph(lambda x: x**2, WHITE)
graph_label = self.get_graph_label(graph, label='x^{2}')
graph.set_stroke(width=1)
graph2 = self.get_graph(lambda x: x**3, WHITE)
graph_label2 = self.get_graph_label(graph2, label='x^{3}')
# Display graph
self.play(ShowCreation(graph), Write(graph_label))
self.wait(1)
self.play(Transform(graph, graph2), Transform(graph_label, graph_label2))
self.wait(1)