From 314333d8f0288ce9b943e7b91ed1fbaf3cfd49fb Mon Sep 17 00:00:00 2001 From: Shavez Date: Wed, 1 Oct 2025 16:33:09 +0530 Subject: [PATCH] Fix x_range slicing in get_area_under_graph to prevent TypeError --- manimlib/mobject/coordinate_systems.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manimlib/mobject/coordinate_systems.py b/manimlib/mobject/coordinate_systems.py index bb8b5aa160..3fd4a468d7 100644 --- a/manimlib/mobject/coordinate_systems.py +++ b/manimlib/mobject/coordinate_systems.py @@ -417,7 +417,7 @@ def get_area_under_graph(self, graph, x_range, fill_color=BLUE, fill_opacity=0.5 raise Exception("Argument `graph` must have attribute `x_range`") alpha_bounds = [ - inverse_interpolate(*graph.x_range, x) + inverse_interpolate(*graph.x_range[:2], x) for x in x_range ] sub_graph = graph.copy()