Label | R Documentation |
R6 class defining text
and font
of labels
text
character text of the label
font
Font
object
new()
Create a new Label
object.
Label$new( text = "", font = NULL, color = NULL, size = NULL, fontFace = NULL, fontFamily = NULL, angle = NULL, align = NULL, maxWidth = NULL, margin = NULL )
text
character text of the label
font
Font
object defining the font of the label
color
character defining the color of the label
size
numeric defining the size of the label
fontFace
character defining the font face of the label as defined in helper enum FontFaces
.
fontFamily
character defining the font family of the label
angle
numeric defining the angle of the label.
align
character defining the alignment of the label as defined in helper enum Alignments
.
maxWidth
numeric that will be converted to a ggplot2::unit object (in "pt" unit) defining the maximum width of text box.
margin
a numeric vector of length 4 defining the size of the area (in pt) around the text in the followin order: top, right, bottom, left.
A new Label
object
createPlotTextBoxFont()
Create a ggtext::element_textbox
directly convertible by ggplot2::theme()
.
Label$createPlotTextBoxFont( color = NULL, size = NULL, fontFace = NULL, fontFamily = NULL, angle = NULL, align = NULL, maxWidth = NULL, margin = NULL )
color
character defining the color of the label
size
numeric defining the size of the label
fontFace
character defining the font face of the label as defined in helper enum FontFaces
.
fontFamily
character defining the font family of the label
angle
numeric defining the angle of the label.
align
character defining the alignment of the label as defined in helper enum Alignments
.
maxWidth
numeric that will be converted to a ggplot2::unit object (in "pt" unit) defining the maximum width of text box.
margin
a numeric vector of length 4 defining the size of the area (in pt) around the text in the followin order: top, right, bottom, left.
An element_text
or element_blank
object.
createPlotTextFont()
Create a ggplot2::element_text()
directly convertible by ggplot2::theme()
.
Label$createPlotTextFont( color = NULL, size = NULL, fontFace = NULL, fontFamily = NULL, angle = NULL, align = NULL, margin = NULL )
color
character defining the color of the label
size
numeric defining the size of the label
fontFace
character defining the font face of the label as defined in helper enum FontFaces
.
fontFamily
character defining the font family of the label
angle
numeric defining the angle of the label.
align
character defining the alignment of the label as defined in helper enum Alignments
.
margin
a numeric vector of length 4 defining the size of the area (in pt) around the text in the followin order: top, right, bottom, left.
An element_text
or element_blank
object.
clone()
The objects of this class are cloneable with this method.
Label$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.