set_gg: Set theme and scales

View source: R/set.R

set_ggR Documentation

Set theme and scales

Description

Set theme, see theme_set and set scales scale_colour_ptt and scale_fill_ptt to use palette.

Usage

set_gg(theme, palette)

unset_gg()

Arguments

theme

a ggplot2 theme

palette

a palette funtion or a name of the ggptt intern palette. See names(ggptt_palettes).

Details

Scales are assign in ggptt_sets environment. 'unset_gg()' is used to restore theme and scales berofe 'set_gg()'.

Functions

  • unset_gg: Unset theme and scales

See Also

Other set: set_ptt()

Examples

l_df <- data.frame(t = c(1,2,3), y = c(4,3,5, 5,7,6), cc = c(1,1,1,2,2,2))
p <- ggplot(l_df, aes(t, y, colour = factor(cc))) + geom_line()
p
set_gg(theme_ptt(), "ptt")
p

pttry/ggptt documentation built on May 4, 2023, 2:48 p.m.