view_grob {grobblR} | R Documentation |
View Grob
Description
View an grob outputted by one of the grob_
functions with a given width and
height.
Usage
view_grob(grob, height = NA_real_, width = NA_real_)
Arguments
grob |
An object outputted by one of the following functions: |
height |
The numeric height in millimeters the user wishes to view the grob in. |
width |
The numeric width in millimeters the user wishes to view the grob in. |
Details
Plotted with gridExtra::grid.arrange()
.
Examples
df = data.frame(
x = c(15, 4, 16, 11),
y = c(10, 30, 3, 10)
)
df %>%
grob_matrix() %>%
view_grob()
gg = ggplot2::ggplot(data = df, mapping = ggplot2::aes(x = x, y = y)) +
ggplot2::geom_line(color = 'red')
gg %>%
grob_image() %>%
view_grob()
[Package grobblR version 0.2.1 Index]