ternaryplotDAS {DASplusR}R Documentation

Symbol Mapping

Description

Generates a symbol map with percentage, absolute or boxplot levels.

Usage

ternaryplotDAS <- function(datname,varnames,main=NULL,Selection=NULL,names=NA,
  variablesLabel=NA,position="corner",color="black",symbolset="none",
  cex=1,sampleIdentification="none",idColor="black",identificationGrid=TRUE,
  gridColor="gray60",gridLabelsColor="darkgray",borderColor="black",
  legend=TRUE,legend_x=.78,legend_y=.9,legend_ex=par("cex"),newPlot=TRUE,
  rowSumsScale=1,id=NULL,idPos=NULL,rowPos=NULL,batchmode=TRUE,...)

Arguments

datname character string; name of data set
names character vector; each element contains the name of a subset/group together with some 'arbitrary text' separated by blank (see details)
x character; the object name of the x-coordinate
y character; the object name of the y-coordinate
var character; the object name of the spatial variable
level character; 'Boxplot', 'Percentile' or 'Absolute'
levelvalues numeric; if type is 'Percentile' the percentiles for the levels, if type is 'Absolute' the absolute level values
symbolset character; the name of the Symbol Set which should be used
title character; map title
xlabel character; a label on the x-axis
ylabel character; a label on the y-axis
cex.xlab numeric; a numerical value giving the amount by which xlabel text should be scaled relative to the default
cex.ylab numeric; a numerical value giving the amount by which ylabel text should be scaled relative to the default
font.xlab numeric; font type for the xlabel
font.ylab numeric; font type for the ylabel
margin numerical; a vector of the form c(bottom, left, top, right) which gives the number of lines of margin to be specified on the four sides of the plot. The default is c(5, 4, 4, 2) + 0.1.
xMin numeric; value for the lower bound of the x-coordinate or NA for no boundary
xMax numeric; value for the upper bound of the x-coordinate or NA for no boundary
yMin numeric; value for the lower bound of the y-coordinate or NA for no boundary
yMax numeric; value for the upper bound of the y-coordinate or NA for no boundary
x.grid logical; if TRUE a grid on the x-axis is drawn
x.grid.type numeric; line type of the grid lines
x.grid.color character; line color of the grid lines
x.grid.width numeric; line width of the grid lines
y.grid logical; if TRUE a grid on the y-axis is drawn
y.grid.type numeric; line type of the grid lines
y.grid.color character; line color of the grid lines
y.grid.width numeric; line width of the grid lines
x.log logical; TRUE if logarithmic x-axis
y.log logical; TRUE if logarithmic y-axis
frame logical; if TRUE a frame is plotted
addP logical; if TRUE the plot is added to an existing one

Details

Using subsets:

names: character vector of length number of 'selected subsets'. Each element should contain the name of one subset and, optionally some arbitrary text separated by a blank. This string is used for identification of the subset and the entire string is printed in the legend. If, in general the command is generated by 'TernaryplotGUI' the text would be in the form of '(number)' where number stands for the size of the subset.

Using grouping variable (factor):

names: character vector of length number of groups selected. Each element should contain the name of one group and, optionally some arbitrary text separated by a blank. This string is used for identification of the group and the entire string is printed in the legend. If, in general the command is generated by 'TernaryplotGUI' the text would be in the form of '(number)' where number stands for the size of the group.

The function 'symbolMapDAS()' generates a map. It plots symbols at the coordinates defined by 'x' and 'y'. The plotting symbols are defined in the Symbol Set 'symbolset'. The plotting symbol is calculated from 'var' by the method chosen via the argument 'type'.

Type 'Boxplot' has five classes defines through the lower extreme values, lower whisker, box, upper whisker and the upper extreme values from the boxplot of 'var'.

Type 'Percentiles' calculates the classes as the quantile from the vector 'levelvalues'.

Type 'absolute' defines the classes from the values given by the argument 'qutiles'.

Each class is represented by a symbol.

If any boundary of the coordinates given by xMin,xMax, yMin, yMax the map is generated from the corresponding values.

Author(s)

Löffler

See Also

'plotlegend','growingDotLegend','SmoothLegend'

Examples

require(DASplusR)
DefaultSymbolSets()
data(KOLA95_C2MM)
symbolMapDAS(dataset=KOLA95_C2MM,x="XCOO",y="YCOO",var="Al",level="Boxplot",
   symbolset="EDA",title="",xlabel="", ylabel="", cex.xlab = "1",
   cex.ylab="1", font.xlab="1", font.ylab="1", margin=c(5,4,4,2)+0.1,
   xMin=NA, xMax=NA, yMin=NA, yMax=NA,x.grid=FALSE,x.grid.type=1,
   x.grid.color=1,x.grid.width=1,y.grid=FALSE,y.grid.type=1,
   y.grid.color=1,y.grid.width=1,x.log=FALSE,y.log=FALSE,frame=TRUE)

[Package DASplusR version 0.0-2 Index]