Skip to content

Line can be seen through vertex dots when using ~.get_line_graph() in OpenGL #2006

@alembcke

Description

@alembcke

Description of bug / unexpected behavior

When drawing a line graph with vertex dots using the OpenGL renderer, the line is visible through the vertex dots:

LineGraphExample_ManimCE_v0 10 0_OpenGL

Now compare this to the Cairo-rendered version:

LineGraphExample_ManimCE_v0 10 0_Cairo

The lines are behind the vertex dots, as they should be.

Expected behavior

The vertex dots should fully cover the lines.

How to reproduce the issue

Code for reproducing the problem
from manim import *

class LineGraphExample(Scene):
    def construct(self):
        plane = NumberPlane(
            x_range = (0, 7),
            y_range = (0, 5),
            x_length = 7,
            axis_config={"include_numbers": True},
        )
        plane.center()
        line_graph = plane.get_line_graph(
            x_values = [0, 1.5, 2, 2.8, 4, 6.25],
            y_values = [1, 3, 2.25, 4, 2.5, 1.75],
            line_color=RED,
            vertex_dot_style=dict(stroke_width=3,  fill_color=BLUE),
            stroke_width = 4,
        )
        self.play(Create(VGroup(plane, line_graph)))
        self.wait(1)

System specifications

System Details
  • OS (with version, e.g Windows 10 v2004 or macOS 10.15 (Catalina)): Ubuntu 21.04
  • RAM: 32GB
  • Python version (python/py/python3 --version): 3.9.5
  • Installed modules (provide output from pip list):
Package                 Version
----------------------- ---------------------
manim                   0.10.0
moderngl                5.6.4
moderngl-window         2.4.0

Additional comments

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue:bugSomething isn't working... For use in issuesopenglConcerning the OpenGL renderer.

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions