plot_diagram: Plot pollen diagram of an entity

Description Usage Arguments Value References Examples

Description

The function takes information on an epd.entity.df-class object and plot a pollen diagram. The function also return the ggplot object, so the object can be stored and afterward combined with other plots.

Usage

1
2
3
4
5
6
7
8
9
plot_diagram(x, chronology = NULL, use_ages = TRUE, exag_low_values = 10,
  color_by_group = TRUE, order_taxa = TRUE, x_breaks = NULL,
  y_breaks = NULL, legend_position = NULL, legend_title = "Legend")

## S4 method for signature 'epd.entity.df'
plot_diagram(x, chronology = NULL,
  use_ages = TRUE, exag_low_values = 10, color_by_group = TRUE,
  order_taxa = TRUE, x_breaks = NULL, y_breaks = NULL,
  legend_position = NULL, legend_title = "Legend")

Arguments

x

epd.entity.df An object of class epd.entity.df-class.

chronology

numeric A number indicating the chronology to be used in the pollen diagram. If not specified the default chronology specified in x is used.

use_ages

logical Indicating whether to plot the pollen diagram with ages or depth of the samples.

exag_low_values

numeric A single value indicating an exageration factor to improve visibility of low pollen values.

color_by_group

logical or numeric or character If logical and TRUE the function plot all taxa from the same taxa groups with the same color. If FALSE, each taxon will be represented in a different color. If numeric or character color_by_group should have length equal number of taxa in x indicating the color to be used.

order_taxa

logical or numeric. If logical and TRUE the diagram is arranged to show taxa from maximum pollen count (at the left) to minimum pollen count (at the right). If numeric order_taxa should be length equal the number of taxa in x indicating the position in which to plot each taxon.

x_breaks

numeric Vector of numbers indicating the break points for the age-depth axis.

y_breaks

numeric Vector of numbers indicating the break points for the pollen counts axis.

legend_position

character One element character indicating the desired position of the legend ("bottom", "left", "right", or "upper").

legend_title

character One element character indicating the title of the legend.

...

Not used with current methods.

Value

The function returns a ggplot object with the pollen diagram. It can be stored and plotted afterwards.

References

http://blarquez.com/684-2/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
epd.connection <- connect_to_epd()
epd.1 <- get_entity(1, epd.connection)
epd.1 <- entity_to_matrices(epd.1)
epd.1 <- filter_taxagroups(epd.1, c("DWAR", "HERB", "TRSH"))
epd.1.per <- counts_to_percentage(epd.1)
plot_diagram(epd.1)
plot_diagram(epd.1.per)

## End(Not run)

dinilu/EPDr documentation built on Aug. 22, 2019, 1:03 p.m.