legend_discrete_cbar: Discrete continuous bar

View source: R/utils.R

legend_discrete_cbarR Documentation

Discrete continuous bar

Description

Generate a continuous bar plot using ggplot functions

Usage

legend_discrete_cbar(
  breaks,
  palette = "Greys",
  direction = 1,
  colors = RColorBrewer::brewer.pal(length(breaks) - 1, palette),
  spacing = "natural",
  border_color = NA,
  legend_title = NULL,
  legend_direction = "horizontal",
  font_size = 5,
  expand_size.x = 1,
  expand_size.y = 1,
  expand.y = 1,
  expand.x = 1,
  spacing_scaling = 1,
  width = 0.1,
  triangle_size = 0.1,
  title_pos = NULL,
  text.angle = NULL,
  text.vjust = NULL,
  text.hjust = NULL,
  text.color = "black",
  neat.labels = FALSE,
  font.family = "serif"
)

Arguments

breaks

Vector of breaks. If +-Inf are used, triangles will be added to the sides of the color bar

palette

Character vector indicating the name of the RColorBrewer palette to use. Alternatively, can pass a vector of colors to the colors argument.

colors

A vector of colors


afsc-gap-products/coldpool documentation built on Sept. 14, 2024, 7:40 p.m.