scattersmooth {GCDkit}R Documentation

scattersmooth

Description

Plotting scatterplot with smoothed densities (smoothed two-dimensional histogram) after Eilers & Goeman (2004).

Usage

scattersmooth(xlab = NULL, ylab = NULL, samples = NULL, nbin = 100, lambda = 1,
    pal = heat.colors(100), pch = 15, col = "blue", cex = 0.3, 
    xlim = NULL, ylim = NULL, ...)

Arguments

xlab, ylab

character; specification of the plotting variables (formulae OK).

samples

character or numeric vector; specification of the samples to be plotted.

nbin

integer, giving the number of bins for x and y, or a vector with two integers.

lambda

the smoothing parameter; larger lambda gives smoother curves.

pal

specification of a palette yielding colours for filled contours.

pch

plotting symbols.

col

plotting colours.

cex

relative size of plotting symbols.

xlim

limits of the x axis.

ylim

limits of the y axis.

...

Further parameters to the original function.

Details

The function produces a scatterplot with smoothed densities (smoothed two-dimensional histogram). The code has been adopted, with only small modifications and new interface to GCDkit, from the original R functions designed by Eilers & Goeman (2004).The original scatterplot function has been renamed to '.scattersmoothMain'.

The complete dataset: SiO2-A/CNK plot

If plotted with lambda=1: SiO2-A/CNK plot smoothed with lambda = 1

If plotted with lambda=100: SiO2-A/CNK plot smoothed with lambda = 100

The variables to be plotted are selected using the function 'selectColumnLabel'. In the specification of the variables can be used also arithmetic expressions, see calcCore for the correct syntax.

The samples can be selected based on combination of three searching mechanisms (by sample name/label, range or a Boolean condition) - see selectSubset for details.

Value

Returns (invisibly) all parameters calculated by the original function.

Warning

The function is NOT Figaro-compatible.

Author(s)

Paul H. C Eilers, p.eilers@erasmusmc.nl

& Vojtěch Janoušek, vojtech.janousek@geology.cz

References

Eilers PHC, Goeman JJ (2004) Enhancing scatterplots with smoothed densities. Bioinformatics 20: 623-628

Examples

    data(atacazo)
    accessVar("atacazo")
    
    scattersmooth("SiO2","A/CNK",xlim=c(55,67),ylim=c(0.7,1.2),pal=heat.colors(100),lambda=1)

    scattersmooth("SiO2","A/CNK",xlim=c(55,67),ylim=c(0.7,1.2),pal=heat.colors(100),pch=17,
        col="black",cex=1,lambda=100)

[Package GCDkit version 6.1 Index]