lac_plot {lacunr}R Documentation

Plot lacunarity curve(s)

Description

Plot lacunarity curve(s)

Usage

lac_plot(..., log = TRUE, group_names = NULL)

lacnorm_plot(..., log = TRUE, group_names = NULL)

hr_plot(..., group_names = NULL)

Arguments

...

One or more data.frames containing lacunarity curve data. Must contain columns named ⁠$box_size⁠, ⁠$lacunarity⁠, ⁠$lac_norm⁠, and ⁠$H_r⁠.

log

A Boolean. TRUE (default) displays the axes on a logarithmic scale, FALSE displays them on a linear scale. For lacnorm_plot() this only controls the x axis, as normalized lacunarity is by definition on a log scale.

group_names

A character vector containing labels for any data.frames passed to .... These labels will appear on the plot legend. If group_names is left empty, the legend uses the names of the data.frames as supplied to ...

Value

A ggplot object displaying the lacunarity or H(r) curve(s). If multiple curves are supplied, their ordering in the plot legend will reflect the order they were listed in the function call.

Examples

# generate array
a <- array(data = rep(c(1,0), 125), dim = c(5,5,5))
# calculate lacunarity at all box sizes
lac_curve <- lacunarity(a, box_sizes = "all")
# plot raw lacunarity curve
lac_plot(lac_curve)


[Package lacunr version 1.0.1 Index]