Learn R Programming

BoneDensityMapping (version 0.1.4)

color_bar: Produce stand alone color bar

Description

Produce stand alone color bar

Usage

color_bar(
  colors,
  mini,
  maxi,
  orientation = "vertical",
  breaks,
  title = "",
  text_size = 11,
  plot = TRUE
)

Value

ggplot object

Arguments

colors

String

mini

Numeric

maxi

Numeric

orientation

"horizontal" or "vertical"

breaks

Numeric vector

title

String

text_size

Numeric

plot

Logical

Examples

Run this code
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