View source: R/utility_plotgeometry.R
ggplot_geometry | R Documentation |
Wrapper function to plot a soil, water and structure geometry
ggplot_geometry( pol_water = NULL, pol_soil = NULL, pol_saturated = NULL, pol_structure = NULL, surf_soil = NULL, surf_water = NULL, xlim = c(NA, NA), ylim = c(NA, NA), axes = TRUE, xlab = "x [m]", ylab = "z [m]" )
pol_water |
tibble with surface water polygons |
pol_soil |
tibble with soil polygons |
pol_saturated |
tibble with saturated soil polygons |
pol_structure |
tibble with structure polygons |
surf_soil |
tibble with soil surfaces |
surf_water |
tibble with water tables |
xlim |
x-axis limits (array with min and max) |
ylim |
y-axis limits (array with min and max) |
axes |
if 'TRUE', plot axis ticks and labels. If 'FALSE', no axis are plotted |
xlab |
x-axis label |
ylab |
y-axis label |
ggplot object
#input pol_soil = data.frame(x = c(0, 0, 2, 2), y = c(0, 1, 1.1, 0), group = 0) pol_saturated = data.frame(x = c(0, 0, 1, 1), y = c(0, 0.5, 0.5, 0)) pol_water = data.frame(x = c(0, 0, 2, 2), y = c(1, 1.5, 1.2, 1)) pol_structure = data.frame(x = c(0.5, 1, 1), y = c(0.5, 0.5, 0.75)) surf_soil = data.frame(x = c(0, 2), y = c(1, 1.1)) surf_water = data.frame(x = c(0, 2), y = c(1.5, 1.2)) #plot ggplot_geometry( pol_water = pol_water, pol_soil = pol_soil, pol_saturated = pol_saturated, pol_structure = pol_structure, surf_soil = surf_soil, surf_water = surf_water )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.