adeg.panel.values {adegraphics}R Documentation

Panel function drawing a third variable into a two-dimensional scatterplot


Panel function for drawing coordinates with variable representation. The values can be represented through symbols with proportional size or various colors.


adeg.panel.values(x, y, z, method, symbol, ppoints, breaks, centerpar = NULL, 
  center = 0)



a numeric vector, x-coordinates for the symbols


a numeric vector, y-coordinates for the symbols


a numeric vector, the third variable with one value per coordinates (x, y)


a character string equal to color or size.
If color, a palette of color is used for the symbols (one color per interval defined by breaks).
If size, symbols' area is proportional to the value. Area is 0 for values equals to center. Two colors are used, one for values smaller than center and the other for values larger than center.


a character string equal to square or circle.


a list of parameters as an extract of adegpar("ppoints"), used for points' drawing.

  • alpha: transparency of points

  • cex: size of points

  • col: border color of points

  • pch: symbol to use

  • fill: filling color


a vector, the breaks used for splitting z if method is color


a list to represent center value using elements in the adegpar("ppoints") list or NULL value. If the method is size, z-values equals to center have a size of zero. If centerpar is not NULL, those z-values are shown as points with the centerpar drawing parameters.


a center value for method size


Draws the points.


For more information about the use of panel functions, please see the lattice package developed by Deepayan Sarkar.

For the symbols size, the method is size uses perceptual scaling (Tanimura et al. 2006).


Alice Julien-Laferriere, Aurelie Siberchicot and Stephane Dray


Tanimura, S. and Kuroiwa, C. and Mizota, T. 2006 Proportional symbol mapping in R Journal of Statistical Software 15, 1–7


if(require(lattice, quietly = TRUE)) {
param <- adegpar("ppoints")[[1]]
param$col <- adegpar("ppalette")[[1L]]$quanti(2)
z <- rnorm(10)
xyplot(1:10 ~ 1:10, panel = function(x, y, ...){
  adeg.panel.values(x, y, z, method = "size", symbol = "square", ppoints =
  param, breaks = pretty(z, 4))})

if(require(lattice, quietly = TRUE)) {
param$col <- adegpar()$ppalette$quali((length(pretty(z, 2)) - 1))
xyplot(1:10 ~ 1:10, panel = function(x, y, ...){
  adeg.panel.values(x, y, z, method = "color", symbol = "circle", 
                    ppoints = param, breaks = pretty(z, 2))}) 

[Package adegraphics version 1.0-15 Index]