im.ridgeline | R Documentation |
This function generates ridgeline plots from stacked satellite imagery data.
im.ridgeline(
im,
scale,
palette = c("viridis", "magma", "plasma", "inferno", "cividis", "mako", "rocket",
"turbo")
)
im |
A 'SpatRaster' object representing the raster data to be visualized. |
scale |
A numeric value that defines the vertical scale of the ridgeline plot. |
palette |
A character string specifying the 'viridis' color palette option to use. Available options: '"viridis"', '"magma"', '"plasma"', '"inferno"', '"cividis"', '"mako"', '"rocket"', '"turbo"'. |
Ridgeline plots are useful for analyzing temporal variations in raster-based satellite imagery. This function extracts raster values and visualizes their distribution across layers.
A 'ggplot' object displaying the ridgeline plot.
See also 'im.import()', 'im.ggplot()'.
[GitHub Repository](https://github.com/ducciorocchini/imageRy/)
library(terra)
library(ggridges)
library(ggplot2)
# Create a 5-layer raster
r <- rast(nrows = 10, ncols = 10, nlyrs = 5)
values(r) <- runif(ncell(r) * 5)
# Generate ridgeline plot
im.ridgeline(r, scale = 2, palette = "viridis") + theme_minimal()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.