color_bar: Produce stand alone color bar

View source: R/BoneDensityFunctions.R

color_barR Documentation

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
)

Arguments

colors

String

mini

Numeric

maxi

Numeric

orientation

"horizontal" or "vertical"

breaks

Numeric vector

title

String

text_size

Numeric

plot

Logical

Value

ggplot object

Examples

colors <- c("darkblue", "blue", "lightblue", "green", "yellow", "red", "pink")
color_bar(colors, 0, 2000, breaks = c(0, 500, 1000, 1500, 2000))

BoneDensityMapping documentation built on Aug. 8, 2025, 6:46 p.m.