From 2e6fafd04aca1ebdb97b246debf69c2dca93448e Mon Sep 17 00:00:00 2001 From: Theo Barollet Date: Thu, 13 Mar 2025 09:21:31 +0100 Subject: [PATCH 1/2] fixing labels not using fill_color because of wrong argument name --- manim/mobject/graph.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manim/mobject/graph.py b/manim/mobject/graph.py index 25a3ce4b17..72bbeba08e 100644 --- a/manim/mobject/graph.py +++ b/manim/mobject/graph.py @@ -589,7 +589,7 @@ def __init__( elif isinstance(labels, bool): if labels: self._labels = { - v: MathTex(v, fill_color=label_fill_color) for v in vertices + v: MathTex(v, color=label_fill_color) for v in vertices } else: self._labels = {} @@ -697,7 +697,7 @@ def _create_vertex( ) 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)): From 8ada4bf7f9aff4c2f60eea354f4a17c30faddffb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 13 Mar 2025 08:26:18 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- manim/mobject/graph.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/manim/mobject/graph.py b/manim/mobject/graph.py index 72bbeba08e..1eafb9ee34 100644 --- a/manim/mobject/graph.py +++ b/manim/mobject/graph.py @@ -588,9 +588,7 @@ def __init__( self._labels = labels elif isinstance(labels, bool): if labels: - self._labels = { - v: MathTex(v, color=label_fill_color) for v in vertices - } + self._labels = {v: MathTex(v, color=label_fill_color) for v in vertices} else: self._labels = {}