g <- symbolmap(inputs=letters[1:10], pch=11:20)
plot(g)
g2 <- symbolmap(range=c(-1,1),
shape=function(x) ifelse(x > 0, "circles", "squares"),
size=function(x) sqrt(ifelse(x > 0, x/pi, -x)),
bg = function(x) ifelse(abs(x) < 1, "red", "black"))
plot(g2, vertical=TRUE, side="left", col.axis="blue", cex.axis=2)
plot(g2, representatives=c(-1,0,1))
Run the code above in your browser using DataLab