color_bar | R Documentation |
Create a Color Bar
color_bar( pal, min, max = -min, width = 1, nticks = 11, ticks = seq(min, max, len = nticks), title = "" )
pal |
Input color palette |
min |
Minimum value for colorbar axis |
max |
Maximum value for colorbar axis |
width |
Value specifying width of the color bar rectangle - must be between 0 and 10 |
nticks |
Integer specifying number of tick marks to label color bar axis with |
ticks |
Numeric vector specifying position of tick marks, for instance as produced by seq() |
title |
Title for the color bar plot |
All credit goes to Stackoverflow user John Colby: https://stackoverflow.com/questions/9314658/colorbar-from-custom-colorramppalette
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.