Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions R/theme.R
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,21 @@
#' # as in the facet_wrap the default strip.position is "top"
#' p3 + theme(strip.text.x.top = element_text(colour = "white", face = "bold"))
#' p3 + theme(panel.spacing = unit(1, "lines"))
#'
#' # Colours -------------------------------------------------------------------
#'
#' p4 <- ggplot(mtcars, aes(wt, mpg)) +
#' geom_point() +
#' annotate(label = "Text Annotation", x = 5, y = 30, geom = "text")
#'
#' # You can use the 'ink' setting to set colour defaults for all layers
#' p4 + theme(geom = element_geom(ink = "dodgerblue"))
#' # Alternate colours are derived from the 'accent' and 'paper' settings
#' p4 + geom_smooth(method = "lm", formula = y ~ x) +
#' theme(geom = element_geom(accent = "tomato", paper = "orchid"))
#' # You can also set default palettes in the theme
#' p4 + aes(colour = drat) +
#' theme(palette.colour.continuous = c("white", "pink", "hotpink"))
#' }
theme <- function(...,
line,
Expand Down
15 changes: 15 additions & 0 deletions man/theme.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.