Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions manim/mobject/geometry/polygram.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,12 +619,16 @@ def __init__(
super().__init__(UR, UL, DL, DR, color=color, **kwargs)
self.stretch_to_fit_width(width)
self.stretch_to_fit_height(height)

v = self.get_vertices()
self.grid_lines = VGroup()

if grid_xstep is not None:
if grid_xstep or grid_ystep:
from manim.mobject.geometry.line import Line

v = self.get_vertices()

if grid_xstep:
grid_xstep = abs(grid_xstep)
count = int(width / grid_xstep)
grid = VGroup(
Expand All @@ -638,7 +642,8 @@ def __init__(
)
)
self.grid_lines.add(grid)
if grid_ystep is not None:

if grid_ystep:
grid_ystep = abs(grid_ystep)
count = int(height / grid_ystep)
grid = VGroup(
Expand Down