powered by
Produce stand alone color bar
color_bar( colors, mini, maxi, orientation = "vertical", breaks, title = "", text_size = 11, plot = TRUE )
ggplot object
String
Numeric
"horizontal" or "vertical"
Numeric vector
Logical
colors <- c("darkblue", "blue", "lightblue", "green", "yellow", "red", "pink") color_bar(colors, 0, 2000, breaks = c(0, 500, 1000, 1500, 2000))
Run the code above in your browser using DataLab