Geometry
In geometry, there are so many functions available here are some of the main functions.
Function |
Description |
---|---|
geom_text() |
Text annotations at specified coordinates. |
geom_label() |
Labeled text annotations with a background and optional border. |
geom_rect() |
Rectangular shapes are defined by their corner coordinates. |
geom_segment() |
Straight-line segments are by their start and end coordinates. |
geom_polygon() |
Filled polygons by a set of coordinates. |
geom_ribbon() |
The area between two lines is commonly used for confidence intervals. |
geom_errorbar() |
Vertical or horizontal error bars represent uncertainties or standard errors. |
geom_crossbar() |
Vertical line segments with a horizontal line representing the range or confidence interval of a variable. |
Straight-line |
A straight line with a specified slope and intercept. |
geom_abline() |
Straight line with a specified slope and intercept. |
geom_curve() |
Create a curved line segment. |
geom_density() |
Create a density plot to estimate the underlying distribution. |
geom_density_2d() |
Create a 2D density plot with contours. |
geom_dotplot() |
Create a dot plot to display the distribution of a variable. |
geom_freqpoly() |
Create a frequency polygon plot. |
geom_jitter() |
Add a small amount of random noise to the position of points. |
geom_linerange() |
Create vertical line segments representing a range of values. |
geom_map() |
Create a map plot using spatial data. |
geom_qq() |
Create a quantile-quantile plot. |
geom_quantile() |
Create a quantile regression line. |
geom_raster() |
Create a raster plot. |
geom_rug() |
Add a rug plot to the axes. |
ggplot2 Cheat Sheet
Welcome to the ultimate ggplot2 cheat sheet! This is your go-to resource for mastering R’s powerful visualization package. With ggplot2, you can create engaging and informative plots effortlessly. Whether you’re a beginner or an experienced programmer, ggplot2’s popularity and versatility make it an essential skill to have in your R toolkit.
If you are new to ggplot2, this cheat sheet will help you get started. It covers the basics of ggplot2, including how to create a basic plot, add layers, and customize the appearance of your plots.