Learn R Programming

G2Sd (version 1.1)

granplot: Histogram with a cumulative percentage curve

Description

This function provides a histogram of the grain-size distribution with a cumulative percentage curve

Usage

granplot(x, xc = 1, hist = TRUE, cum = TRUE, main = "", 
			col.cum = "red", col.hist="gray")

Arguments

x
A numeric matrix or data frame
xc
Define a column
hist
If TRUE, display a histogram; if FALSE, do not display a histogram
cum
If TRUE, display a cumulative percentage curve; if FALSE do not display a cumulative percentage curve
main
Add a title to the current plot
col.cum
Color in which cumulative percentage curve will be drawn
col.hist
Color in which histogram will be drawn

Value

  • A histogram with a cumulative percentage curve

encoding

UTF8

Details

The obtained graph is the most commonly used by Sedimentologists

Examples

Run this code
data(granulo)
granplot(granulo,xc=1,hist=TRUE,cum=TRUE,main="Grain-size Distribution",
			col.hist="grey",col.cum="black")

Run the code above in your browser using DataLab