Learn R Programming

DivInsight (version 0.1.0)

plot_sites_scatter_H: Plot H against Date

Description

Plot Shannon's H on the Y axis and dates on the X axis with scaled spacing for each date and scattered points.

Usage

plot_sites_scatter_H(
  clusterised_object,
  xlabel = "Date",
  ylabel = "Diversity (H)",
  main_title = "Shannon's H over Time"
)

Value

Returns a ggplot2 scatter plot in the plot panel, showing the relationship between dates and diversity index values.

Arguments

clusterised_object

An object created by the clusterise_sites function.

xlabel

The X axis label with "Date" as default.

ylabel

The Y axis label with "Diversity (H)" as default.

main_title

The main label with "Shannon's H over Time" as default.

Examples

Run this code
# create a scatter plot showing the diversity over time at the Caquetá province
Colombia_Caquetá_dataframe <- subset(Colombia, stateProvince == "Caquetá")

clusterised_Caquetá <- clusterise_sites(dataframe = Colombia_Caquetá_dataframe,
                                       cluster_min_length = 30,
                                       group_radius = 20000
)

plot_sites_scatter_H(clusterised_Caquetá)

Run the code above in your browser using DataLab