Learn R Programming

IDPmisc (version 0.3.1)

ipairs: Image Scatter Plot Matrix for Large Datasets

Description

Produces an image scatter plot matrix of large datasets where the colors encode the density of the points in the scatter plots.

Usage

ipairs(x,
       pixs = 1, zmax = NULL, colramp = IDPcolorRamp,
       border = FALSE, labels, cex.lab = NULL, nlab = 5, pty = "s",
       main = NULL, cex.main = par("cex.main"), verbose = FALSE, ...)

Arguments

x
data.frame or matrix
pixs
Pixel size in mm on the plotting device.
zmax
Maximum counts per Pixel to be plotted. When NULL each scatter plot has its individual scale. If a number >= maximum number of counts per pixel is supplied, the scale will be identical for all scatter plots. The maximum of the number per pi
colramp
Color ramp to encode the density of the points within a pixel.
border
Shall border be drawn between the colors in the legend: TRUE / FALSE.
labels
Labels of columns. If NULL the names of x are used.
cex.lab
Size of the labels. If NULL they are calculated automatically.
nlab
Approximate number of labels on axes.
pty
See Argument pty in par.
main
Titel.
cex.main
Size of title.
verbose
When verbose == TRUE, the values for cex.main and cex.lab are returned in addition to zmax.
...
Additional arguments to plot.default

Value

  • Maximum number of counts per Pixel found. Additional elements are returned when verbose == TRUE.

concept

  • large dataset
  • huge dataset

Details

The idea is similar to plot.hexbin. The hexagons are better suited to reflect the density of points in a plane than the squares used here. Nevertheless squares are, contrary to hexagons, invariant to reflexions at the x- and y-axis and therefore suited for scatter plot matrices and also for plotting factors. Code is based on R function pairs V1.7.

See Also

ilagplot, ixyplot, Image

Examples

Run this code
zmax <- ipairs(airquality,pixs=2,main="Air Quality")
ipairs(airquality,pixs=2,zmax=zmax,border=TRUE)

zmax <- ipairs(iris,pixs=2)
ipairs(iris,pixs=2,zmax=zmax)

Run the code above in your browser using DataLab