scale_fill_ft: Fill scale constructor for FT colors

Description Usage Arguments See Also Examples

View source: R/gg-scales.R

Description

Fill scale constructor for FT colors

Usage

1
2
scale_fill_ft(palette = "main", discrete = TRUE, reverse = FALSE,
  ...)

Arguments

palette

Character name of a palette

discrete

Boolean indicating whether color aesthetic is discrete or not

reverse

Boolean indicating whether the palette should be reversed

...

Additional arguments passed to discrete_scale() or scale_color_gradientn()

See Also

scale_color_ft

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 df <- data.frame(
   c1 = rep(c("a","b"),3),
   c2 = rep(c("c","d","e"), each = 2),
   x = runif(6)
 )

 library(ggplot2)
 # plot with discrete color scale
 ggplot(df) +
   geom_bar(aes(c1, x, fill = c2), stat = "identity") +
   scale_fill_ft()

Financial-Times/ftplottools documentation built on Nov. 8, 2021, 5:11 p.m.