colour_bar: Add a colour bar to a plot

View source: R/utils.R

colour_barR Documentation

Add a colour bar to a plot

Description

This function adds a colour bar to a plot

Usage

colour_bar(
  uniform_values,
  colour_palette_fn,
  cols = NULL,
  legend_labels,
  variable_name,
  variable_name_line,
  cex = 1.8,
  cex.axis = 1.6
)

Arguments

uniform_values

A numeric, pretty, uniform sequence of values that encompass the range of the variable for which the colour scale is to be plotted. This sequence should be the same as the sequence used to create colours on the plot originally.

colour_palette_fn

The function used to provide colour on the main plot.

cols

A sequence of colours can be provided instead of the function above.

legend_labels

Legend labels for tick marks.

variable_name

A variable name to accompany the colour bar.

variable_name_line

A numeric value specifying the number of lines the variable_name is away from the axis.

cex

The font size of the title, relative to the default.

cex.axis

The font size of the legend labels for tick marks.

Author(s)

Edward Lavender


edwardlavender/fvcom.tbx documentation built on Nov. 26, 2022, 10:28 p.m.