Nothing
\donttest{
if (require(fmesher, quietly = TRUE) &&
require(ggplot2, quietly = TRUE)) {
# Load Gorilla data
gorillas <- inlabru::gorillas_sf
# Plot mesh using default edge colors
ggplot() +
gg(gorillas$mesh)
# Don't show interior and exterior boundaries
ggplot() +
gg(gorillas$mesh, interior = FALSE, exterior = FALSE)
# Change the edge colors
ggplot() +
gg(gorillas$mesh,
edge.color = "green",
int.color = "black",
ext.color = "blue"
)
# Use the x-coordinate of the vertices to colorize the triangles and
# mask the plotted area by the survey boundary, i.e. only plot the inside
xcoord <- gorillas$mesh$loc[, 1]
ggplot() +
gg(gorillas$mesh, color = (xcoord - 580), mask = gorillas$boundary) +
gg(gorillas$boundary, alpha = 0)
}
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.