This function generates a visualization of a fractal tree based on the geometry and attributes from the build_tree function.
The tree is plotted with branches and leaves. The user can customize the appearance using various parameters.
plot_tree(
tree_df,
d_col = NULL,
branch_color = "black",
leaf_color = "black",
simplify = FALSE,
dTolerance = 0.15
)A ggplot object representing the tree profile.
A data frame resulting from the build_tree function, containing the tree's geometry and attributes.
Name of the column that contains the diameters along the branches. Usually 'diameter'. Default is NULL (diameters are not used).
A character string specifying the color of the tree branches. Default is 'black'.
A character string specifying the color of the tree leaves. Default is 'black'.
A logical value. If TRUE, simplifies the geometries of the tree branches using a given tolerance. Default is FALSE.
A numeric value specifying the tolerance parameter used when simplifying geometries, applicable if simplify = TRUE. Default is 0.15.