scale_colour_continuous: Continuous colour scales

Description Usage Arguments See Also Examples

View source: R/scale-colour.r

Description

Colour scales for continuous data default to the values of the ggplot2.continuous.colour and ggplot2.continuous.fill options. If these options are not present, "gradient" will be used. See options() for more information.

Usage

1
2
3
4
5
scale_colour_continuous(..., type = getOption("ggplot2.continuous.colour",
  default = "gradient"))

scale_fill_continuous(..., type = getOption("ggplot2.continuous.fill", default
  = "gradient"))

Arguments

...

Additional parameters passed on to the scale type

type

One of "gradient" (the default) or "viridis" indicating the colour scale to use

See Also

scale_colour_gradient(), scale_colour_viridis_c(), scale_fill_gradient(), and scale_fill_viridis_c()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
v <- ggplot(faithfuld, aes(waiting, eruptions, fill = density)) +
geom_tile()
v

v + scale_fill_continuous(type = "gradient")
v + scale_fill_continuous(type = "viridis")

# The above are equivalent to
v + scale_fill_gradient()
v + scale_fill_viridis_c()

SahaRahul/ggplot2 documentation built on May 17, 2019, 1:46 p.m.