Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

using `color` instead of `fill_color` with MathTeX for node labels (#4501)

Aditi Junejaeca7f17853d2
diff --git a/manim/mobject/graph.py b/manim/mobject/graph.py
index 12710dfea..7eaee412b 100644
--- a/manim/mobject/graph.py
+++ b/manim/mobject/graph.py
@@ -588,9 +588,7 @@ class GenericGraph(VMobject, metaclass=ConvertToOpenGL):
self._labels = labels
elif isinstance(labels, bool):
if labels:
- self._labels = {
- v: MathTex(v, fill_color=label_fill_color) for v in vertices
- }
+ self._labels = {v: MathTex(v, color=label_fill_color) for v in vertices}
else:
self._labels = {}
@@ -697,7 +695,7 @@ class GenericGraph(VMobject, metaclass=ConvertToOpenGL):
)
if label is True:
- label = MathTex(vertex, fill_color=label_fill_color)
+ label = MathTex(vertex, color=label_fill_color)
elif vertex in self._labels:
label = self._labels[vertex]
elif not isinstance(label, (Mobject, OpenGLMobject)):