rysgran.plot: Generates a Bivariated Plot

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

rysgran.plot generates a bivariated plot of grain size statistical parameters passed by gran.stats function

Usage

1
2
3
4
5
6
rysgran.plot(x = NULL, y = NULL, data = NULL, output = "phi", lang = "en-US", 
    method= "folk", main = NULL, xlab = NULL, ylab = NULL, show.grid=TRUE,
    show.labels = FALSE, label.points = FALSE, pch = 19, 
    col.labels = "black", labels = NULL, col = "black", 
    cex.labels = 1, cex.points=1,
    pos = 1, z.cex.range = NULL, z = NULL, ...)

Arguments

x

the x coordinates of points in the bivariate plot. The value should be presented in quotation marks. Abbreviations are accepted in upper and lower case as well as the full name of the variable, independent of the chosen language. Examples of accepted values are: "mean", "Mean", "Sorting", "sorting", "sort", "Sort", "Skewness", "skewness", "Skew", "skew", "Kurtosis", "kurtosis", "Kurt", "kurt". The same logic applies to the Portuguese language, including the accent

y

the y coordinates of points in the bivariated plot. Has the same prerequisites for the argument x

data

a data matrix with grain size samples similar to the camargo2001 matrix in which each column contains the weight (in grams) of each mesh size (in phi or micrometers) and the lines represent the samples

output

output result scale. Could be output="phi" for logarithmic scale or output="metric" for geometric scale. The default is "phi"

lang

language . Should be English ("en-US", "en-GR", "eng", "e"), or Portuguese ("pt-BR", "pt-PT", "port", "p"). The default is "en-US"

method

statistical analysis method. Could be method="folk" (Folk & Ward, 1957), method="moment" (Tanner, 1995), method="otto" (Otto, 1939), method="trask" (Trask, 1930), method="mcA" and method="mcB" (McCammon, 1962). Default is method="folk"

main

an overall title for the plot. If NULL it will be generated an automatic title according to language chosen. Default is NULL

xlab

a title for the x axis. If NULL it will be generated an automatic title according to language chosen. Default is NULL

ylab

a title for the y axis. If NULL it will be generated an automatic title according to language chosen. Default is NULL

show.grid

logical. If TRUE lines are plotted on the verbal classifications of x and y axes. Default is TRUE

show.labels

logical. If TRUE the points are replaced by text passed by labels argument. Default is FALSE

label.points

logical. if TRUE text is added, provided by the argument labels, with the points on the graph. the text position to the point should be changed by argument pos. labels.points will be automatically FALSE if show.labels is TRUE. The default is FALSE

pch

Either an integer specifying a symbol or a single character to be used as the default in plotting points. Default is "19"

col.labels

color of text if the arguments show.label, label.points or z are defined. Default is "black"

labels

a character vector or expression specifying the text to be written. If NULL labels will be the row names of the data argument. Default is NULL

col

symbol color used in pch argument. Default is "black"

cex.labels

character size of text provided by the argument labels added with the point (or replacing it) in case show.label, label.points or z arguments are defined. Default is "1"

cex.points

character size of points provided by the argument pch. Default is "1"

pos

a position specifier for the text. Values of 1, 2, 3 and 4, respectively indicate positions below, to the left of, above and to the right of the specified coordinates. Default is "1"

z.cex.range

Vector of length 2. Minimum and maximum 'cex' of the bubbles plotted if 'z' is not NULL. Replace the argument cex.points. Default is "(1,3)"

z

vector with the same length of x and y whose value must be used to define the points expansion factor and color (bubble plot). If NULL, a simple plot is drawn (no 'bubbles'). Default is "NULL"

...

further graphical parameters

Details

The data matrix provided to data argument should be similar to the camargo2001 matrix in which each column contains the weight (in grams) of each mesh size (in phi or micrometers) and the lines represent the samples. rysgran.plot uses the gran.stats function to calculate grain size statistical parameters according to the analysis method chosen by method argument. When z argument is used to draw bubble plots the legend.bubbles function should be used to draw the legend accordingly

Value

return a bivariated plot

Note

rysgran.plot depends on the package 'soiltexture'

Author(s)

Eliandro R. Gilbert ([email protected])

References

- Folk, R. L. and Ward W. C. (1957) Brazos river bar: A study in the significance of grain size parameters. Journal of Sed. Petrol., 27: 3–27.

- McCammon, R. B. (1962) Efficiencies of percentile measurements for describing the mean size and sorting of sedimentary particles. Journal of Geology, 70: 453–465.

- Otto, G. H. (1939) A modified logarithmic probability paper for the interpretation of mechanical analysis of sediments. Journal os Sed. Petrol., 9: 62–76.

- Tanner, W.F. (1995) Environmental clastic granulometry. Florida Geological Survey, Special Publication 40. 142 pp.

- Trask, P. D. (1930) Mechanical analysis of sediments by centrifuge. Economic Geology, 25: 581–599.

See Also

gran.stats, class.percent, rysgran.ternary, rysgran.hist, legend.bubbles

Examples

 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
library(rysgran)
data(camargo2001)
data(sed.phi)

# Plot Mean and Sorting

rysgran.plot ("mean", "sort", data=camargo2001, output="phi", method="folk")


# Using show.labels

rysgran.plot("mean" , "sort" , data=camargo2001 , method="folk",
	show.labels = TRUE,	labels = NULL)


# Skewness and Kurtosis with label.points

rysgran.plot ("skew" , "kurt" , data=camargo2001, output="phi",
	method="folk", show.labels = FALSE, labels = NULL,
	label.points = TRUE, pch = 19, col.labels = "black",
	col = "blue", cex.labels = 1,	cex.points = 1, pos=1)


# Mean and Sorting with Kurtosis as bubbles
# Calculating the grain size statistics
rys <- gran.stats(camargo2001, method="folk")

# Plotting
rysgran.plot ("mean" , "sort" , data=camargo2001, method="folk", pch = 21, 
	col = "red", z=rys$Kurtosis, z.cex.range=c(1,3),bg="red")

# Plotting the legend
legend.bubbles ("bottomright", z=rys$Kurtosis , nleg=3, pch=21, col="black", 
	z.cex.range=c(1,3), x.intersp=1.3, y.intersp=1.3, digits=1, title="Kurtosis")


# Mean and Sorting with Skewness as bubbles for different environments
# Calculating the grain size statistics
rys <- gran.stats(sed.phi, method="folk")
env<- as.factor(rep(c("River","Tidal Flat","Subtidal","Beach"),each=10))

# Plotting
rysgran.plot ("mean" , "sort" , data=sed.phi, method="folk", pch = 19, 
	col = c("red","blue","black","brown")[env], z=rys$Skewness, z.cex.range=c(1,3))

# Plotting the legends
legend.bubbles ("bottomright", z=rys$Skewness , nleg=3, pch=21, col="black", 
	z.cex.range=c(1,3), x.intersp=1.3, y.intersp=1.3, digits=1, title="Skewness")

legend ("bottomleft", c("Beach","River","Subtidal","Tidal Flat"),
	pch=15, col=c("red","blue","black","brown"))

rysgran documentation built on May 1, 2019, 8:06 p.m.