R6 class for adding labels to a ggbrain_panel
R6 class for adding labels to a ggbrain_panel
Public fields
addl_args
a named list of additional argument to be passed to geom_text/geom_label at render
Active bindings
data
a data.frame containing labels to be printed on the panel. Must contain dim1, dim2, and label as columns. The dim1 and dim2 columns control where the labels will appear on the panel
image
A character string specifying the image to which these labels pertain
label_column
A character string indicating which data.frame column should be used for drawing labels
min_px
A positive integer indicating the minimum number of pixels present on slice that will generate a label
Methods
Method new()
create a new ggbrain_label object
Usage
ggbrain_label$new(
data = NULL,
geom = "text",
image = NULL,
label_column = NULL,
min_px = NULL,
...
)
Arguments
data
a data.frame containing labels to be printed on the panel. Must contain dim1, dim2, and label as columns. The dim1 and dim2 columns control where the labels will appear on the panel
geom
The geom type to be plotted. Must be "text" or "label", corresponding to geom_text and geom_label, respectively.
image
A string specifying the image to which these labels pertain
label_column
the column in
data
that should be drawn as labels on the plotmin_px
the minimum number of pixels
...
All other arguments that will be passed directly to geom_text or geom_label such as hjust, size, and color