s.value {adegraphics}R Documentation

2-D scatter plot with proportional symbols (bubble plot)


This function represents a two dimensional scatter plot with a third value represented by symbols.


s.value(dfxy, z, breaks = NULL, xax = 1, yax = 2, method = c("size",
"color"), symbol = c("square", "circle", "diamond", "uptriangle", "downtriangle"),
col = NULL, nclass = 4, center = 0, centerpar = NULL, facets = NULL,
plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)



a data frame used to produce the plot


a vector (or a matrix) with as many values as rows in dfxy


a vector containing the breaks used for splitting z value. If NULL, pretty(z, n) is used.


an integer (or a vector) indicating which column(s) of dfxy is(are) plotted on the x-axis


an integer (or a vector) indicating which column(s) of dfxy is(are) plotted on the y-axis


color or size value for represent z. If color, a palette of color is used for the symbols (one color per interval). If size, symbols of proportional area are used. Area is 0 for values equals to center (default 0). Two colors are used, for values less than center and larger than center.


value for symbol type


a color or a colors vector to color symbols. If method is size, a 2-length vector of color is expected. If method is color, it must have as many colors as the number of class.


an integer for the number of desired intervals, ignored if breaks is not missing.


a center value for method size


a logical or a list to represent center value using elements in the adegpar("ppoints") list


a factor splitting the rows of dfxy so that subsets of the data are represented on different sub-graphics


a logical indicating if the graphics is displayed


a logical indicating if the data should be stored in the returned object. If FALSE, only the names of the data arguments are stored


a logical. If TRUE, the graphic is superposed to the graphics already plotted in the current device


an integer indicating the position of the environment where the data are stored, relative to the environment where the function is called. Useful only if storeData is FALSE


additional graphical parameters (see adegpar and trellis.par.get)


An object of class ADEg (subclass S2.value) or ADEgS (if add is TRUE and/or if facets or multidimensional z or vectors for xax/yax are used).
The result is displayed if plot is TRUE.


For the symbol size, if the method is size, we use perceptual scaling (Tanimura et al. 2006) .


Alice Julien-Laferriere, Aurelie Siberchicot aurelie.siberchicot@univ-lyon1.fr and Stephane Dray


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

See Also

S2.value ADEg.S2


data(rpjdl, package = "ade4")
fau.coa <- ade4::dudi.coa(rpjdl$fau, scan = FALSE, nf = 3)
g1 <- s.value(fau.coa$li, fau.coa$li[,3])
update(g1, key = list(space = "right", columns = 1))
g2 <- s.value(fau.coa$li, fau.coa$li[,3], method = "color", plegend.size = 0.8)
g3 <- s.value(fau.coa$li, fau.coa$li[,3], plegend.size = 0.8, symbol = "square",
   method = "color",  col = colorRampPalette(c("yellow", "blue"))(6))
g4 <- s.value(fau.coa$li, fau.coa$li[,3], plot = FALSE)
g5 <- s.value(fau.coa$li, fau.coa$li[, 3], center = 0, method = "size", 
  symbol = "circle", col = c("yellow", "red"), plot = FALSE)
g6 <- ADEgS(c(g4, g5), positions = layout2position(matrix(c(1, 2), 1, 2)), 
  add = matrix(0, ncol = 2, nrow = 2))  
data(irishdata, package = "ade4")
irq0 <- data.frame(scale(irishdata$tab, scale = TRUE))
g7 <- s.value(irishdata$xy.utm, irq0, Sp = irishdata$Spatial.contour, paxes.draw = FALSE, 
  pgrid.draw = FALSE, pSp.alpha = 0.4)

[Package adegraphics version 1.0-15 Index]