plot_forest_profile {fractalforest}R Documentation

Visualize the 2D profile of a fractal trees forest

Description

This function generates a 2D visualization of the forest profile using data from a fractal trees. The forest is plotted with tree branches and leaves. The user can customize the appearance using different parameters.

Usage

plot_forest_profile(
  tree_df,
  d_col = NULL,
  branch_color = "black",
  leaf_color = "black",
  label = NULL,
  label_size = 4,
  simplify = FALSE,
  dTolerance = 0.15
)

Arguments

tree_df

A data frame resulting from the build_forest_profile function, containing the geometry and attributes of the trees.

d_col

Name of the column that contains the diameters along the branches. Usually 'diameter'. Default is NULL (diameters are not used).

branch_color

A character string specifying the color of the tree branches. Default is 'black'.

leaf_color

A character string specifying the color of the tree leaves. Default is 'black'.

label

A character string or column name specifying the labels for the trees (typically placed along the x-axis). Default is NULL.

label_size

A numeric value specifying the size of the labels on the plot. Default is 4.

simplify

A logical value. If TRUE, simplifies the geometries of the tree branches using a given tolerance. Default is FALSE.

dTolerance

A numeric value specifying the tolerance parameter used when simplifying geometries, applicable if simplify = TRUE. Default is 0.15.

Value

A ggplot object representing the forest profile.


[Package fractalforest version 1.0.1 Index]