Fork me on GitHub

ggplot from ŷhat


scale_color_gradient

Usage

scale_color_gradient(low = 'red', high = 'blue')

Arguments

Name Description
low Color for low end of gradient.
high Color for high end of gradient.

Examples

ggplot(aes(x='x', y='y', color='z'), data=diamonds.head(1000)) +\
    geom_point() +\
    scale_color_gradient(low='red', high='white')
ggplot(aes(x='x', y='y', color='z'), data=diamonds.head(1000)) +\
    geom_point() +\
    scale_color_gradient(low='#05D9F6', high='#5011D1')
ggplot(aes(x='x', y='y', color='z'), data=diamonds.head(1000)) +\
    geom_point() +\
    scale_color_gradient(low='#E1FA72', high='#F46FEE')