Label¶
Qualified name: manim.mobject.geometry.labeled.Label
- class Label(label, label_config=None, box_config=None, frame_config=None, **kwargs)[source]¶
Bases:
VGroupA Label consisting of text surrounded by a frame.
- Parameters:
label (str | Tex | MathTex | Text) – Label that will be displayed.
label_config (dict[str, Any] | None) – A dictionary containing the configuration for the label. This is only applied if
labelis of typestr.box_config (dict[str, Any] | None) – A dictionary containing the configuration for the background box.
frame_config (dict[str, Any] | None) – A dictionary containing the configuration for the frame.
kwargs (Any)
Examples
Example: LabelExample ¶
from manim import * class LabelExample(Scene): def construct(self): label = Label( label=Text('Label Text', font='sans-serif'), box_config = { "color" : BLUE, "fill_opacity" : 0.75 } ) label.scale(3) self.add(label)
class LabelExample(Scene): def construct(self): label = Label( label=Text('Label Text', font='sans-serif'), box_config = { "color" : BLUE, "fill_opacity" : 0.75 } ) label.scale(3) self.add(label)Methods
Attributes
alwaysCall a method on a mobject every frame.
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.
- _original__init__(label, label_config=None, box_config=None, frame_config=None, **kwargs)¶
Initialize self. See help(type(self)) for accurate signature.