suns: Plot Suns

sunsR Documentation

Plot Suns

Description

This function makes a graphical diagram of multivariate data. Every element represents one line in the sun and the length of the line indicates the concentration of the element.

Usage

suns(x, full = TRUE, scale = TRUE, radius = TRUE, labels = dimnames(x)[[1]],
locations = NULL, nrow = NULL, ncol = NULL, len = 1, key.loc = NULL,
key.labels = dimnames(x)[[2]], key.xpd = TRUE, xlim = NULL, ylim = NULL,
flip.labels = NULL, col.stars = NA, axes = FALSE, frame.plot = axes, main = NULL,
sub = NULL, xlab = "", ylab = "", cex = 0.8, lwd = 0.25, lty = par("lty"),
xpd = FALSE,
mar = pmin(par("mar"), 1.1 + c(2 * axes + (xlab != ""), 2 * axes + (ylab != ""), 1, 0)),
add = FALSE, plot = TRUE, ...)

Arguments

x

a matrix or a data frame

full

if TRUE, a whole circle will be made

scale

if TRUE, the data will be scaled

radius

should be TRUE, otherwise the lines in the sun will not be plotted

labels

the labels for the suns inside the map

locations

the locations for the suns inside the map

nrow, ncol

integers giving the number of rows and columns to use when locations=NULL

len

scaling factor for the length of the lines (according to the size of the map)

key.loc

the location for the legend

key.labels

the labels in the legend

key.xpd

A logical value or NA. If FALSE, all plotting is clipped to the plot region, if TRUE, all plotting is clipped to the figure region, and if NA, all plotting is clipped to the device region.

flip.labels

logical indication if the label locations should flip up and down from diagram to diagram.

axes

if FALSE, no axes will be drawn

frame.plot

if TRUE, a box will be made around the plot

main, sub, xlab, xlim, ylim, col.stars, ylab, cex, lwd, lty, xpd, mar

graphical parameters and labels for the plot

add

if TRUE, it will be added to the plot

plot

nothing is plotted

...

graphical parameters for plotting the box

Details

Each sun represents one row of the input x. Each line of the sun represents one choosen element. The distance from the center of the sun to the point shows the size of the value of the (scaled) column.

Value

No return value, creates a plot.

Author(s)

Peter Filzmoser <P.Filzmoser@tuwien.ac.at> http://cstat.tuwien.ac.at/filz/

References

C. Reimann, P. Filzmoser, R.G. Garrett, and R. Dutter: Statistical Data Analysis Explained. Applied Environmental Statistics with R. John Wiley and Sons, Chichester, 2008.

Examples

data(ohorizon)
X=ohorizon[,"XCOO"]
Y=ohorizon[,"YCOO"]
el=log10(ohorizon[,c("Co","Cu","Ni","Rb","Bi","Na","Sr")])

sel <- c(3,8,22, 29, 32, 35, 43, 69, 73 ,93,109,129,130,134,168,181,183,205,211,
      218,237,242,276,292,297,298,345,346,352,372,373,386,408,419,427,441,446,490,
      516,535,551,556,558,564,577,584,601,612,617)
x=el[sel,]
suns(x,ncol=8,key.loc=c(15,0.5),lwd=1.3)

StatDA documentation built on June 7, 2023, 6:26 p.m.

Related to suns in StatDA...