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.
gx.2dproj.plot(save, rowids = NULL, main = "", pch = 3, cex = 0.8, col = 1, ...)
the saved object from gx.2dproj
.
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.
an alternative plot title to that in the saved object from gx.2dproj
, see Details below.
by default a ‘+’, pch = 3
will be plotted. See Note below for alternate plotting symbols.
by default symbols and characters are plotted at cex = 0.8
, a 20% reduction in font size.
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%.
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.
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.
# NOT RUN {
## 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)
# }
Run the code above in your browser using DataLab