scale_colour_correlaid_d | R Documentation |
Discrete, continuous and binned ggplot2 colour and fill scales
based on the CorrelAid design guide.
For a list of available palettes and colours see correlaid_pal()
.
Change the values of the ggplot2.continuous.colour
and ggplot2.continuous.fill
options()
to set these scales as default in ggplot2 (see Details).
scale_colour_correlaid_d(direction = 1, option = "qualitative", ...)
scale_color_correlaid_d(direction = 1, option = "qualitative", ...)
scale_fill_correlaid_d(direction = 1, option = "qualitative", ...)
scale_colour_correlaid_c(
direction = 1,
option = "gradient",
guide = "colourbar",
...
)
scale_color_correlaid_c(
direction = 1,
option = "gradient",
guide = "colourbar",
...
)
scale_fill_correlaid_c(
direction = 1,
option = "gradient",
guide = "colourbar",
...
)
scale_colour_correlaid_b(
direction = 1,
option = "gradient",
guide = "coloursteps",
...
)
scale_color_correlaid_b(
direction = 1,
option = "gradient",
guide = "coloursteps",
...
)
scale_fill_correlaid_b(
direction = 1,
option = "gradient",
guide = "coloursteps",
...
)
direction |
Sets the order of colours in the scale:
|
option |
A character string indicating the colour palette to use. Four options are available:
|
... |
Other arguments passed on to |
guide |
A function used to create a guide or its name.
See |
Function naming scheme:
The suffix _d
indicates that the scale is discrete.
_c
: continuous scale.
_b
: binned scale.
Change the following options()
to set these scales as the default ggplot2 scales:
options( ggplot2.discrete.colour = correltools::scale_colour_correlaid_d, ggplot2.discrete.fill = correltools::scale_fill_correlaid_d, ggplot2.continuous.colour = correltools::scale_colour_correlaid_c, ggplot2.continuous.fill = correltools::scale_fill_correlaid_c )
correlaid_pal()
library(ggplot2)
ggplot(example_projects_labels, aes(category, fill = category)) +
geom_bar(show.legend = FALSE) +
scale_fill_correlaid_d(option = "gradient")
ggplot(mtcars, aes(wt, mpg, colour = mpg)) +
geom_point(size = 5) +
scale_colour_correlaid_c()
ggplot(mtcars, aes(wt, mpg, fill = mpg)) +
geom_point(shape = 21, colour = "white", size = 5) +
scale_fill_correlaid_b()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.