Learn R Programming

epade (version 0.2.2)

scatter.ade: Scatterplot

Description

Draw a scatter or a bubble plot

Usage

scatter.ade(x, y=NULL, group=NULL, z=NULL, data=NULL, vnames=NULL,
            main=NULL, xlab=NULL, ylab=NULL, glab=NULL, zlab=NULL,
            legendon="topright", xlim=NULL, ylim=NULL, zlim=NULL,
            lwd=1, cex=1, pch=16, lty=1,
            xticks=NULL, yticks=NULL, zticks=NULL,
            col=NULL, tcol=NULL, bgcol=NULL, lcol=NULL, alpha=NULL,
            fitline=0, wall=0, v=NULL, h=NULL, diag=FALSE, span=0.75)

Arguments

x
  • a numeric vector of x coordinates for the points
a character string with the name of the x variable in the data.frame a formula y~x, y~x+group or y~x+z+group

item

  • y
  • a character string with the name of the y variable in the data.frame
  • group
  • a character string with the name of the group variable in the data.frame
  • z
  • a character string with the name of the size variable in the data.frame
  • data
  • vnames
  • main
  • xlab
  • ylab
  • glab
  • zlab
  • legendon
  • "bottom"
  • "bottomleft"
  • "left"
  • "topleft"
  • "top"
  • "topright"
  • "right"
  • "center"
  • "none"
  • xlim
  • ylim
  • zlim
  • lwd
  • cex
  • pch
  • lty
  • xticks
  • yticks
  • zticks
  • col
  • tcol
  • bgcol
  • lcol
  • alpha
  • fitline
  • 1. a lm regression line
  • 2. a loess local regression line
  • 3. a pylinomial regression line
  • wall
  • v
  • h
  • diag
  • span

itemize

  • 0. not fit

See Also

curves.ade

Examples

Run this code
x<-rnorm(1000)
y<-rnorm(1000)
z<-rnorm(1000, 3)
g<-round(runif(1000))
# plot vs ID
scatter.ade(x, vnames=c("blue","red"), alpha=0.25, fitline=2, wall=0, lwd=2, col=4)
# Scatter plot
scatter.ade(x, y*x, g, vnames=c("blue","red"), alpha=0.25, wall=2)
# bubble plot
scatter.ade(x, y, g, z, vnames=c("blue","red"), alpha=0.25, xlim=c(-5, 5), zticks=c(1, 2, 3, 4, 5), wall=3)

Run the code above in your browser using DataLab