set_style: Set Default Color Pallete

set_corrplot_styleR Documentation

Set Default Color Pallete

Description

Set default color pallete for qcorrplot.

Usage

set_corrplot_style(
  colours = NULL,
  breaks = seq(-1, 1, length.out = 5),
  labels = breaks,
  limits = c(-1, 1),
  scale = NULL,
  ...
)

set_default_style()

Arguments

colours

vector of colours to use for n-colour gradient.

breaks

a numeric vector of positions.

labels

a character vector giving labels (must be same length as breaks).

limits

a numeric vector of length two providing limits of the scale.

scale

NULL or a Scale object.

...

other parameters passing to scale_fill_gradientn.

Author(s)

Hou Yun

Examples

## use corrplot style
set_corrplot_style()
qcorrplot(mtcars) + geom_shaping(marker = "circle")
## use custom colour palette
set_corrplot_style(colours = c("red", "white", "blue"))
qcorrplot(mtcars) + geom_shaping(marker = "circle")
## use custom scale
set_corrplot_style(scale = ggplot2::scale_fill_viridis_c(limits = c(-1, 1)))
qcorrplot(mtcars) + geom_shaping(marker = "circle")
## reset to default scale
set_default_style()
qcorrplot(mtcars) + geom_shaping(marker = "circle")

Hy4m/linkET documentation built on June 30, 2023, 7:39 p.m.