Description Usage Arguments Examples
View source: R/plot_apa_list.R
APA-maps that are stored in an APA-list
-object are being plotted.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## S3 method for class 'apa_list'
plot(
x,
subset = NULL,
color_map = 1,
tree_size_column = attr(x, "apa_config")$weight_column,
tree_size_scale = 1,
pal = sf::sf.colors,
single_plots = FALSE,
add_legend = TRUE,
critical = "#FF000033",
add = FALSE,
cex = graphics::par("cex"),
add_subplot = FALSE,
add_plot_id_values = TRUE,
...
)
|
x |
A |
subset |
The subset of APA-maps in |
color_map |
If |
tree_size_column |
Column name in |
tree_size_scale |
If |
pal |
If no |
single_plots |
Should the APA-maps be plotted as individual plots
( |
add_legend |
If |
critical |
A color to shade the critical area close to the plot borders that may be influenced by an edge effect. |
add |
If |
cex |
Character expansion factor for labels (legend, titles) |
add_subplot |
If |
add_plot_id_values |
If |
... |
not implemented. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | library(APAtree)
data(tree_enrico, package = "APAtree")
data(plot_enrico, package = "APAtree")
data(subplot_enrico, package = "APAtree")
tree_enrico$height_class <- cut(tree_enrico$height, breaks = seq(0, 40, 4))
# only calculating an apa_list for two plots and with a coarse resolution of 1 m
# to save time.
apa_list_enrico <-
apa_list(plot_dat = subset(plot_enrico, id_plot %in% c("5.2", "8.2")),
tree_dat = tree_enrico,
plot_id_column = "id_plot",
tree_id_column = "id_tree",
weight_column = "crown_radius_95",
agg_class_column = c("species", "height_class"),
res = 1,
apa_polygon = TRUE)
# plot all APA-maps in an apa_list:
plot(apa_list_enrico)
# choose a different palette for plotting
plot(apa_list_enrico, pal = rainbow)
# choose a custom color scheme
color_map <-
data.frame(species = c("Fagus sylvatica", "Pseudotsuga menziesii"),
species_color = c("#7d5831", "#bcc746"))
plot(apa_list_enrico, color_map = color_map)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.