Description Usage Arguments Value Examples
View source: R/plot-add-polygon-overview.R
Add spatial representation of polygon layout to a ggplot2 object.
1 | plot_add_polygon_overview(plot, bgm_as_df, polygon_overview = 0.2)
|
plot |
ggplot2 object. Can be a ggplot grob. |
bgm_as_df |
*.bgm file converted to a dataframe. Please use |
polygon_overview |
numeric value between 0 and 1 indicating the size used to plot the polygon overview in the
upper right corner of the plot. Default is |
ggplot grob
1 2 3 4 5 6 7 8 | d <- system.file("extdata", "setas-model-new-trunk", package = "atlantistools")
bgm_as_df <- convert_bgm(bgm = file.path(d, "VMPA_setas.bgm"))
p <- plot_line(preprocess$physics, wrap = NULL)
p <- custom_grid(p, grid_x = "polygon", grid_y = "variable")
grob <- plot_add_polygon_overview(p, bgm_as_df)
gridExtra::grid.arrange(grob)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.