Geometric objects (geoms) are the visual representations of (subsets of) observations.
Click on any of the following images to see the quick reference of the corresponding geom.
Coming up next: geom_bar, geom_boxplot
geom | Useful stats (default in bold) | Default position adjustment | Composite | Parameters (when used with given stat) |
---|---|---|---|---|
blank | identity | identity | no parameters | |
abline | abline | identity | slope, intercept, size, linetype, colour, alpha | |
identity | identity | slope, intercept, size, linetype, colour, alpha | ||
hline | hline | identity | yintercept, size, linetype, colour, alpha | |
identity | identity | y, yend, size, linetype, colour, alpha | ||
vline | vline | identity | xintercept, size, linetype, colour, alpha | |
identity | identity | x, xend, size, linetype, colour, alpha | ||
text | identity | identity | x, y, label, size, colour, alpha, hjust, vjust, parse | |
point | identity | identity | x, y, size, shape, colour, fill, alpha, na.rm | |
jitter | identity | jitter | x, y, size, shape, colour, fill, alpha, na.rm | |
segment | identity | identity | x, xend, y, yend, size, linetype, colour, alpha, arrow | |
line | identity | identity | yes | group, x, y, size, linetype, colour, alpha, arrow |
bar | identity | stack | x, y, size, linetype, colour, fill, alpha, weight(?) ??? | |
bin | stack | x, y, size, linetype, colour, fill, alpha, weight(?) ??? | ||
histogram | alias for geom_bar | |||
area | identity | stack | yes | group, x, y, size, linetype, colour, fill, alpha, na.rm |
ribbon | identity | identity | yes | group, x, ymin, ymax, size, linetype, colour, fill, alpha, na.rm |
linerange | identity | identity | x, ymin, ymax, size, linetype, colour, alpha | |
pointrange | identity | identity | x, y, ymin, ymax, size, shape, linetype, colour, fill, alpha | |
errorbar | identity | identity | x, ymin, ymax, size, linetype, colour, alpha, width | |
errorbarh | identity | identity | x, xmin, xmax, y, size, linetype, colour, alpha, height | |
crossbar | identity | identity | x, y, ymin, ymax, size, linetype, colour, fill, alpha, width, fatten | |
boxplot | identity | dodge | x, ymin, lower, middle, upper, ymax, size, colour, fill, alpha, weight(?), width(?), outliers(?), outlier.size, outlier.shape, outlier.colour ??? | |
boxplot | dodge | x, ymin, lower, middle, upper, ymax, size, colour, fill, alpha, weight(?), width(?), outliers(?), outlier.size, outlier.shape, outlier.colour ??? | ||
path | identity | identity | yes | group, x, y, size, linetype, colour, alpha, na.rm, arrow, linemitre, linejoin, lineend |
polygon | identity | identity | yes | group, x, y, size, linetype, colour, fill, alpha |
rect | identity | identity | xmin, xmax, ymin, ymax, size, linetype, colour, fill, alpha | |
rug | identity | identity | x, y, size, linetype, colour, alpha | |
step | identity | identity | yes | group, x, y, size, linetype, colour, alpha, direction |
bin2d | identity | identity | xmin, xmax, ymin, ymax, size, linetype, colour, fill, alpha, weight(?) ??? | |
bin2d | identity | xmin, xmax, ymin, ymax, size, linetype, colour, fill, alpha, weight(?) ??? | ||
tile | identity | identity | x, y, size, linetype, colour, fill, alpha | |
hex | identity | identity | x, y, size, colour, fill, alpha | |
binhex | identity | x, y, size, colour, fill, alpha | ||
density | identity | identity | yes | group, x, y, size, linetype, colour, fill, alpha, weight(?) ??? |
density | identity | yes | group, x, y, size, linetype, colour, fill, alpha, weight(?) ??? | |
density2d | identity | identity | yes | group, x, y, size, linetype, colour, alpha, weight(?), na.rm, arrow, linemitre, linejoin, lineend ??? |
density2d | identity | yes | group, x, y, size, linetype, colour, alpha, weight(?), na.rm, arrow, linemitre, linejoin, lineend ??? | |
contour | identity | identity | yes | group, x, y, size, linetype, colour, alpha, weight(?), na.rm, arrow, linemitre, linejoin, lineend ??? |
contour | identity | yes | group, x, y, size, linetype, colour, alpha, weight(?), na.rm, arrow, linemitre, linejoin, lineend ??? | |
freqpoly | identity | identity | yes | group, x, y, size, linetype, colour, alpha, weight(?) ??? |
bin | identity | yes | group, x, y, size, linetype, colour, alpha, weight(?) ??? | |
quantile | identity | identity | yes | group, x, y, size, linetype, colour, alpha, na.rm, arrow, linemitre, linejoin, lineend |
quantile | identity | yes | group, x, y, size, linetype, colour, alpha, weight, quantiles, formula, xseq, method, na.rm, arrow, linemitre, linejoin, lineend | |
smooth | identity | identity | yes | group, x, y, ymin, ymax, size, linetype, colour, fill, alpha |
smooth | identity | yes | group, x, y, size, linetype, colour, fill, alpha, weight |
We retrieved the list of supported parameters and their default values using Geom$find(geomname)$parameters()
, where geomname is the string representing the geom (e.g., "point"
). For some geoms, this does not provide all the parameters (e.g., geom_abline also supports the slope and intercept parameters), so we read the source code to try to determine which parameters the corresponding geom might use.