simplevis is a package of wrapper functions that aim to make ggplot2 visualisation easier and quicker.
simplevis supports the following families of visualisation type:
hbar (i.e horizontal bar)
Each visualisation family generally has 4 functions.
The function name specifies whether or not a visualisation is to be coloured by a variable (
*_col()), facetted by a variable (
*_facet()), or neither (
*()) or both of these (
Colouring by a variable means that different values of a selected variable are to have different colours. Facetting means that different values of a selected variable are to have their facet.
*() function such
gg_point() requires only a dataset, an x variable and a y variable.
*_col() function such
gg_point_col() requires only a dataset, an x variable, a y variable, and a colour variable.
*_facet() function such
gg_point_facet() requires only a dataset, an x variable, a y variable, and a facet variable.
*_col_facet() function such
gg_point_col_facet() requires only a dataset, an x variable, a y variable, a colour variable, and a facet variable.
Data is generally plotted with a stat of
identity, which means data is plotted as is. Only for boxplot, there is a different default stat of boxplot, which means data will be transformed to boxplot statistics.
_sf functions for maps differ slightly, which is discussed further below.
Customise titles with
gg_point_col(penguins, bill_length_mm, body_mass_g, species, title = "Adult penguin mass by bill length and species", subtitle = "Palmer station, Antarctica", x_title = "Bill length (mm)", y_title = "Body mass (g)", col_title = "Penguin species", caption = "Source: Gorman KB, Williams TD, Fraser WR (2014)")