Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gx.2dproj.plot

Function to Display a Saved 2-d Projection Object


Description

Displays the 2-d projection saved from gx.2dproj, optionally the row numbers of the input matrix or the row identifiers, if available, may be displayed instead of the default plotting symbol.

Usage

gx.2dproj.plot(save, rowids = NULL, main = "", pch = 3, cex = 0.8, col = 1, ...)

Arguments

save

the saved object from gx.2dproj.

rowids

to display the input matrix row numbers set rowids = TRUE. Setting rowids = FALSE replaces the row numbers with the row identifiers from the input matrix. The default rowids = NULL causes the default symbol, a ‘+’ to be plotted.

main

an alternative plot title to that in the saved object from gx.2dproj, see Details below.

pch

by default a ‘+’, pch = 3 will be plotted. See Note below for alternate plotting symbols.

cex

by default symbols and characters are plotted at cex = 0.8, a 20% reduction in font size.

col

by default symbols and charcaters are plotted in black, col = 1, specify col = 2 to obtain red (see display.lty for the default colour palette). See Note below for alternate colours.

...

further arguments to be passed to methods concerning the plot. For example, if it is required to make the plot title smaller, add cex.main = 0.9 to reduce the font size by 10%.

Details

If main is undefined the plot title from the saved object from gx.2dproj is displayed. If no plot title is required set main = " ", or if a user defined plot title is required it should be defined in main, e.g., main = "Plot Title Text".

The x- and y-axis labels are those in the saved object from gx.2dproj and indicate the type of 2-d projection in the display.

Note

The available symbols are:
pch: 0 = square, 1 = circle, 2 = triangle, 3 = plus, 4 = X,
5 = diamond, 6 = upside-down triangle, 7 = square with X,
8 = asterisk, 9 = diamond with plus, 10 = circle with plus,
11 = double triangles, 12 = square with plus,
13 = circle with X, 14 = square with upside-down triangle.
Symbols 15 to 18 are solid in the colour specified:
15 = square, 16 = circle, 17 = triangle, 18 = diamond.

The available colours from the default ‘palette’ are:
Col: 0 = none, 1 = black, 2 = red, 3 = green, 4 = dark blue,
5 = turquoise, 6 = pink, 7 = yellow, 8 = grey, 9 = black.

Author(s)

Robert G. Garrett

References

Reimann, C., Filzmoser, P., Garrett, R. and Dutter, R., 2008. Statistical Data Analysis Explained: Applied Environmental Statistics with R. John Wiley & Sons, Ltd., 362 p.

Venables, W.N. and Ripley, B.D., 2001. Modern Applied Statistics with S-Plus, 3rd Edition, Springer, 501 p.

See Also

Examples

## Make test data available
data(sind.mat2open)

## Display default 2-d projection
sind.save <- gx.2dproj(sind.mat2open, ifilr = TRUE)

## Display saved object with more informative title
gx.2dproj.plot(sind.save,
main = "Howarth & Sinding-Larsen\nStream Sediments, ilr Transformed Data")

## Display saved object with row identifiers in a smaller blue font
gx.2dproj.plot(sind.save,
main = "Howarth & Sinding-Larsen\nStream Sediments, ilr Transformed Data",
rowids = TRUE, cex = 0.7, col = 4)

## Display 2-d projection after trimming the 3 most extreme samples
sind.2dproj.trim3 <- gx.2dproj(sind.mat2open, ifilr = TRUE, row.omits = c(13,15,16))
gx.2dproj.plot(sind.save,
main = "Howarth & Sinding-Larsen\nStream Sediments, ilr Transformed Data",
rowids = FALSE, cex = 0.7, col = 4)

## Clean-up
rm(sind.save)
rm(sind.2dproj.trim3)

rgr

Applied Geochemistry EDA

v1.1.15
GPL-2
Authors
Robert G. Garrett
Initial release
2018-03-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.