
Create Elegant Data Visualisations Using the Grammar of Graphics …
ggplot2 is a system for declaratively creating graphics, based on The Grammar of Graphics. You provide the data, tell ggplot2 how to map variables to aesthetics, what graphical primitives to …
Introduction to ggplot2
ggplot2 is an R package for producing visualizations of data. Unlike many graphics packages, ggplot2 uses a conceptual framework based on the grammar of graphics. This allows you to …
Package index - ggplot2
All ggplot2 plots begin with a call to ggplot(), supplying default data and aesthetic mappings, specified by aes(). You then add layers, scales, coords and facets with +. To save a plot to …
Create a new ggplot — ggplot • ggplot2
ggplot() initializes a ggplot object. It can be used to declare the input data frame for a graphic and to specify the set of plot aesthetics intended to be common throughout all subsequent layers …
Modify axis, legend, and plot labels — labs • ggplot2
Good labels are critical for making your plots accessible to a wider audience. Always ensure the axis and legend labels display the full variable name. Use the plot title and subtitle to explain …
ggplot2: Create Elegant Data Visualisations Using the Grammar of ...
A system for 'declaratively' creating graphics, based on "The Grammar of Graphics". You provide the data, tell 'ggplot2' how to map variables to aesthetics, what graphical primitives to use, and …
Aesthetic specifications - ggplot2
In addition, ggplot2 provides a conversion factor as the variable .pt, so if you want to draw 12pt text, you can also set size = 12 / .pt.
Points — geom_point • ggplot2
The point geom is used to create scatterplots. The scatterplot is most useful for displaying the relationship between two continuous variables. It can be used to compare one continuous and …
Complete themes — ggtheme - ggplot2
The signature ggplot2 theme with a grey background and white gridlines, designed to put the data forward yet make comparisons easy. theme_bw() The classic dark-on-light ggplot2 theme. …
Colour related aesthetics: colour, fill, and alpha - ggplot2
Run vignette("ggplot2-specs") to see an overview of other aesthetics that can be modified. Other aesthetics documentation: aes () , aes_group_order , aes_linetype_size_shape , aes_position …