scale_fill_binary: scale_fill_binary

scale_fill_binaryR Documentation

scale_fill_binary

Description

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

Usage

scale_fill_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 fill scale to be used with ggplot2

See Also

discrete_scale magma

Examples

## Not run: 
if(interactive()){
 ggplot(mtcars, aes(mpg, fill=factor(am))) + geom_histogram() + scale_fill_binary()
 }

## End(Not run)

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