data(olives)
x <- olives$oleic
y <- olives$linoleic
z <- olives$Region
# the default
hexpie(x, y, z)
# zooming in (transformation of the total number of obs in each bin)
hexpie(x, y, z, freq.trans = sqrt)
# circular shapes
hexpie(x, y, z, freq.trans = sqrt, shape = "pie")
# classical piecharts
hexpie(x, y, z, freq.trans = sqrt, shape = "pie", p.rule = "angles")
# the total numbers of obs are reflected via alpha-blending,
the grid is not shown and RGB colors are used
hexpie(x, y, z, freq.trans = sqrt, shape = "hex", p.rule = "radial", alpha.freq = TRUE,
col = "rgb", show.hex = FALSE)
# no transformation, grid shown
hexpie(x, y, z, freq.trans = NULL, shape = "hex", p.rule = "radial", alpha.freq = TRUE,
col = "rgb", show.hex = TRUE)
# diamonds data
require(ggplot2)
data(diamonds)
x2 <- diamonds$carat
y2 <- diamonds$price
z2 <- diamonds$color
# a standard plot with colors via ggplot2
qplot(x2, y2, colour = z2)