LabeledDot#
Qualified name: manim.mobject.geometry.arc.LabeledDot
- class LabeledDot(label, radius=None, **kwargs)[source]#
Bases:
DotA
Dotcontaining a label in its center.- Parameters
label (str | SingleStringMathTex | Text | Tex) – The label of the
Dot. This is rendered asMathTexby default (i.e., when passing astr), but other classes representing rendered strings likeTextorTexcan be passed as well.radius (float | None) – The radius of the
Dot. IfNone(the default), the radius is calculated based on the size of thelabel.
Examples
Example: SeveralLabeledDots ¶
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
animateUsed to animate the application of any method of
self.animation_overridescolordepthThe depth of the mobject.
fill_colorIf there are multiple colors (for gradient) this returns the first one
heightThe height of the mobject.
n_points_per_curvesheen_factorstroke_colorwidthThe width of the mobject.