Label¶
Qualified name: manim.mobject.geometry.labeled.Label
- class Label(label, label_config=None, box_config=None, frame_config=None, **kwargs)[source]¶
Bases:
VGroup
A 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
label
is 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
animate
Used to animate the application of any method of
self
.animation_overrides
color
depth
The depth of the mobject.
fill_color
If there are multiple colors (for gradient) this returns the first one
height
The height of the mobject.
n_points_per_curve
sheen_factor
stroke_color
width
The 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.