Skip to contents

To produce colour key as a gradient rectangle

Usage

plot_color_code(
  expression = NULL,
  x,
  y,
  width,
  height,
  colour = "Spectral",
  method = "Expression"
)

Arguments

expression

A numeric vector defining the expression to be plotted.

x

A number. The x position of the lower left corner of the rectangle

y

A number. The y position of the lower left corner of the rectangle

width

A number. The width of the rectangle

height

A number. The height of the rectangle

colour

Either 'Spectral' or 'BlueRed' for Angle colour key.

method

Either 'Angle' or 'Spectral' for Angle and any expression, respectively.

Examples

if (FALSE) { # \dontrun{
plot(1:5)
plot_color_code(x = 3, y = 4.5, width = 1, height = 0.3, colour = 'Spectral', method = 'Angle')
} # }