Description Usage Arguments Examples
Applies your custom color scales as color aesthetics
1 2 | scale_color_pprabhu(..., palette = "main", discrete = TRUE,
reverse = TRUE)
|
... |
additional arguments to pass to scale_color_gradientn |
palette |
Choose from 'pprabhu_palettes' list |
discrete |
whether to use a discrete/continuous colour palette |
reverse |
logical input, Do you want to reverse the order of colors? |
1 2 3 4 5 6 7 8 9 | #' library(ggplot2)
# Create some variables
x <- 1:9 * 2
y <- 1:9 * 1
xy <- data.frame(x,y)
# Plots a scatter plot and applies "div" palette to color aesthetics
ggplot(xy,aes(x=x,y=y,color=as.character(y))) +
geom_point(stat="identity",size=9,fill="white") +
scale_color_pprabhu(palette = "hot")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.