View source: R/utility_plotgeometry.R
ggplot_add_soilmarker | R Documentation |
Adds a standard soil surface indicator icon to an existing ggplot object
ggplot_add_soilmarker( plt, xc, yc, theta = 0, scale = 1, linesize = 0.5, colour_soil = "#65571d", n = 3 )
plt |
ggplot object |
xc, yc |
x and y-position where marker touches the soil surface (middle) |
theta |
rotation angle (in case label needs to be rotated, in rad) |
scale |
scaling factor for marker. Default width is approx 1 |
linesize |
thickness of lines |
colour_soil |
line colour for all lines |
n |
number of lines to plot underneath the water table, as part of the symbol |
ggplot object with added water table marker
#generate simple plot plt <- ggplot2::ggplot() + ggplot2::annotate("rect", xmin = -2, xmax = 2, ymin = -2, ymax = 2, fill = "yellow") + ggplot2::coord_fixed(ratio = 1) #add water table marker ggplot_add_soilmarker(plt, x = 1, y = 1, scale = 1, theta = 0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.