Cartesian plane

Part of Foundations

Cartesian plane preview
remixableManimCE2Dgridloop

Two axes over a light unit grid, with a point at (2, 3) and dashed drop lines running to each axis. The loop walks the point around a square through four lattice points and back to its start. The grid and the axes are separate layers from the point itself, which is what lets the preview strip the plane back to the bare point.

manim/cartesian_plane.py

"""Cartesian plane: a point on a unit grid, dropped to both axes.

Render (the driver does this for every palette; these are for eyeballing):
    P=/opt/homebrew/opt/python@3.11/bin/python3.11
    ASSET_MODE=still  $P -m manim -s -t -r 1600,1600 manim/cartesian_plane.py CartesianPlane
    ASSET_MODE=motion $P -m manim -qh   -r 1600,1600 manim/cartesian_plane.py CartesianPlaneLoop
"""

from manim import (
    DOWN,
    LEFT,
    RIGHT,
    UP,
    DashedLine,
    Dot,
    NumberPlane,

The full Manim source and the rendered video come with a plan.