R6 class defining text and font of labels
Methods
Method new()
Create a new Label object.
Usage
Label$new(
text = "",
font = NULL,
color = NULL,
size = NULL,
fontFace = NULL,
fontFamily = NULL,
angle = NULL,
align = NULL,
maxWidth = NULL,
margin = NULL
)Arguments
textcharacter text of the label
fontFontobject defining the font of the labelcolorcharacter defining the color of the label
sizenumeric defining the size of the label
fontFacecharacter defining the font face of the label as defined in helper enum
FontFaces.fontFamilycharacter defining the font family of the label
anglenumeric defining the angle of the label.
aligncharacter defining the alignment of the label as defined in helper enum
Alignments.maxWidthnumeric that will be converted to a ggplot2::unit object (in "pt" unit) defining the maximum width of text box.
margina numeric vector of length 4 defining the size of the area (in pt) around the text in the followin order: top, right, bottom, left.
Method createPlotTextBoxFont()
Create a ggtext::element_textbox directly convertible by ggplot2::theme().
Usage
Label$createPlotTextBoxFont(
color = NULL,
size = NULL,
fontFace = NULL,
fontFamily = NULL,
angle = NULL,
align = NULL,
maxWidth = NULL,
margin = NULL
)Arguments
colorcharacter defining the color of the label
sizenumeric defining the size of the label
fontFacecharacter defining the font face of the label as defined in helper enum
FontFaces.fontFamilycharacter defining the font family of the label
anglenumeric defining the angle of the label.
aligncharacter defining the alignment of the label as defined in helper enum
Alignments.maxWidthnumeric that will be converted to a ggplot2::unit object (in "pt" unit) defining the maximum width of text box.
margina numeric vector of length 4 defining the size of the area (in pt) around the text in the followin order: top, right, bottom, left.
Method createPlotTextFont()
Create a ggplot2::element_text() directly convertible by ggplot2::theme().
Usage
Label$createPlotTextFont(
color = NULL,
size = NULL,
fontFace = NULL,
fontFamily = NULL,
angle = NULL,
align = NULL,
margin = NULL
)Arguments
colorcharacter defining the color of the label
sizenumeric defining the size of the label
fontFacecharacter defining the font face of the label as defined in helper enum
FontFaces.fontFamilycharacter defining the font family of the label
anglenumeric defining the angle of the label.
aligncharacter defining the alignment of the label as defined in helper enum
Alignments.margina numeric vector of length 4 defining the size of the area (in pt) around the text in the followin order: top, right, bottom, left.