si_legend_fill: SI legend for fill aesthetics

View source: R/si_legends.R

si_legend_fillR Documentation

SI legend for fill aesthetics

Description

[Experimental] Function attempts to create a well formatted color-based legend to adorn an existing plot.

Usage

si_legend_fill()

Details

This helper function compliments the various si_style() themes. The main action is to move a fill-based legend to the top left of the plot and stretch the legend. The same action can be done using the ggplot2::guides() function.

Examples

## Not run: 
library(systemfonts)
library(ggplot2)
ggplot(iris, aes(Sepal.Length, y = Sepal.Width, fill = Sepal.Width)) +
geom_point(shape = 21, size = 4) + si_legend_fill() + si_style()

## End(Not run)


USAID-OHA-SI/glitr documentation built on July 5, 2024, 3:24 p.m.