manim.mobject.geometry.LabeledDot

class LabeledDot(label, radius=None, **kwargs)[source]

Bases: manim.mobject.geometry.Dot

A Dot containing a label in its center.

Parameters
  • label (Union[str, SingleStringMathTex, Text, Tex]) – The label of the Dot. This is rendered as MathTex by default (i.e., when passing a str), but other classes representing rendered strings like Text or Tex can be passed as well.

  • radius (float) – The radius of the Dot. If None (the default), the radius is calculated based on the size of the label.

Return type

None

Examples

Example: SeveralLabeledDots

../_images/SeveralLabeledDots-1.png
from manim import *

class SeveralLabeledDots(Scene):
    def construct(self):
        sq = Square(fill_color=RED, fill_opacity=1)
        self.add(sq)
        dot1 = LabeledDot(Tex("42", color=RED))
        dot2 = LabeledDot(MathTex("a", color=GREEN))
        dot3 = LabeledDot(Text("ii", color=BLUE))
        dot4 = LabeledDot("3")
        dot1.next_to(sq, UL)
        dot2.next_to(sq, UR)
        dot3.next_to(sq, DL)
        dot4.next_to(sq, DR)
        self.add(dot1, dot2, dot3, dot4)

Methods

Attributes

animate

Used to animate the application of a method.

animation_overrides

depth

The depth of the mobject.

height

The height of the mobject.

width

The width of the mobject.