scale_colour_binary: scale_colour_binary

scale_colour_binaryR Documentation

scale_colour_binary

Description

Provides exactly two colors from the viridis magma palette (red and purple)

Usage

scale_colour_binary(direction = 1, ...)

scale_color_binary(direction = 1, ...)

Arguments

direction

Order of colors, 1: purple-red. -1: red-purple, Default: 1

...

Additional arguments to be passed to ggplot2::discrete_scale

Details

The default top level from the discrete viridis scale is bright yellow, which is too bright. This scale uses red for top level.

Value

a colour scale to be used with ggplot2

See Also

discrete_scale magma

Examples

## Not run: 
if(interactive()){
 ggplot(mtcars, aes(hp, mpg, colour=factor(am))) + geom_point() + scale_colour_binary()
 }

## End(Not run)

grasshoppermouse/hagenutils documentation built on Dec. 6, 2024, 8:31 p.m.