Skip to content

Commit 02446b3

Browse files
Fixed the positioning of line graph that was under the graph (#1951)
* removed a part of code that positioned a new line graph behind the axes * added a line graph graphical unit test Co-authored-by: Hugues Devimeux <[email protected]>
1 parent 49010b8 commit 02446b3

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

manim/mobject/coordinate_systems.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,6 @@ def construct(self):
12551255
for x, y, z in zip(x_values, y_values, z_values)
12561256
]
12571257
graph.set_points_as_corners(vertices)
1258-
graph.z_index = -1
12591258
line_graph["line_graph"] = graph
12601259

12611260
if add_vertex_dots:
Binary file not shown.

tests/test_graphical_units/test_coordinate_systems.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,16 @@ def test_number_plane(scene):
1616
)
1717

1818
scene.add(plane)
19+
20+
21+
@frames_comparison
22+
def test_line_graph(scene):
23+
plane = NumberPlane()
24+
first_line = plane.get_line_graph(
25+
x_values=[-3, 1], y_values=[-2, 2], line_color=YELLOW
26+
)
27+
second_line = plane.get_line_graph(
28+
x_values=[0, 2, 2, 4], y_values=[0, 0, 2, 4], line_color=RED
29+
)
30+
31+
scene.add(plane, first_line, second_line)

0 commit comments

Comments
 (0)