Description Usage Arguments Details Value Examples
Add an aesthetic to a grob matrix object.
1 2 3 4 5 6 | add_aesthetic(
grob_object,
aesthetic,
value = NULL,
group = c("cells", "column_names", "column_headings")
)
|
grob_object |
The R6 object outputted by either |
aesthetic |
The matrix aesthetic the user wishes to add. |
value |
A single value or a matrix of values the user wants to apply to the group of matrix / text elements for the given aesthetic. If a matrix of values is supplied, then the matrix must be of the same dimensions as the chosen subset of the matrix / text. |
group |
The group of the grob matrix object the user wants to add the aesthetic to. For objects initialized by |
Accepted aesthetics:
background_alpha
background_color
border_color
border_sides
border_width
font_face
group_elements
replace_na
round_rect_radius
text_align
text_cex
text_font
text_color
text_just
text_v_align
text_v_just
text_rot
To see descriptions of the aesthetics above, see the documentation of ga_list
.
The R6 object of the grob matrix class with its aesthetics properties altered.
1 2 3 4 5 | df = data.frame(var1 = c(5, 14, 6, 10), var2 = c(3, 30, 17, 7))
df %>%
grob_matrix() %>%
add_aesthetic(aesthetic = 'text_color', value = 'red', group = 'cells') %>%
view_grob()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.