grpplot: Scatter Plot by Group

Description Usage Arguments Details Author(s) Examples

Description

Create a scatter plot by group.

Usage

1
2
  grpplot(dat, group, col = NULL, pch = NULL, cex = 1, 
          legend.loc = "rightside",...)

Arguments

dat

A matrix or data frame to be plotted.

group

A factor or vector giving group information of columns of dat.

col

A strings of colors recognized by the plot function. Or a vector of color values. For more details, see ?colors.

pch

A vector of symbol values recognized by the plot function.

cex

Size of symbols.

legend.loc

Position of legend. The location should be one of bottomright, bottom, bottomleft, left, topleft, top, topright, right, center,mousepoint and rightside.

...

Additional graphics parameters passed to plot, such as main, xlab and ylab.

Details

The scatter plot is by columns of dat. If legend.loc is mousepoint, legend will be located by the mouse point.

Author(s)

Wanchang Lin [email protected]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
data(iris)
grpplot(iris[,1:2], iris[,5],main="IRIS DATA",legend.loc="topleft")

## color values for the group and symbol size
grpplot(iris[,1:2], iris[,5],main="IRIS DATA",col=c(4,5,6),cex=1.2,
        legend.loc="topright") 

## color and symbols for the group. legend location
grpplot(iris[,c(1,3)], iris[,5], col=c("red", "green3", "blue"),
        pch=c(15,16,17), main="IRIS DATA",legend.loc="topleft")
      
## plot vector
grpplot(iris[,3], iris[,5],main="IRIS DATA",legend.loc="top")

## pairs plot. 
grpplot(iris, iris[,5],main="IRIS DATA")

wilsontom/FIEmspro documentation built on Feb. 19, 2018, 9:03 a.m.