Description Usage Arguments Details Value Examples
Add a structure to a grob matrix / image / text object.
1 | add_structure(grob_object, structure, value)
|
grob_object |
The R6 object initialized by one of:
|
structure |
The structure the user wishes to add. |
value |
If Otherwise, a single value to apply to the |
Accepted structures:
column_widths_p
n_lines
padding_p
aspect_ratio_multiplier
maintain_aspect_ratio
To see descriptions of the structures above, see the documentation of ga_list
.
The initial R6 object of the grob object class with its structure properties altered.
1 2 3 4 5 6 7 8 9 10 11 12 13 | df = data.frame(x = c(5, 14, 6, 10), y = c(3, 30, 17, 7))
df %>%
grob_matrix() %>%
add_structure(structure = 'column_widths_p', value = c(1, 4)) %>%
view_grob()
gg = ggplot2::ggplot(data = df, mapping = ggplot2::aes(x = x, y = y)) +
ggplot2::geom_line(color = 'red')
gg %>%
grob_image() %>%
view_grob()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.