addscale: function to add a scale to a image plot

View source: R/add_scale.R

addscaleR Documentation

function to add a scale to a image plot

Description

method to plot a scale in image plot.

Usage

addscale(
  z,
  zlim = range(z, na.rm = TRUE),
  col = grDevices::heat.colors(12),
  breaks = pretty(zlim),
  horiz = TRUE,
  ylim = NULL,
  xlim = NULL,
  ...
)

Arguments

z

matrix or vector

zlim

z limit

col

color

breaks

interval for the tickmarks

horiz

TRUE (default) to a horizontal scale

ylim

y limitS

xlim

x limit

...

other arguments to plot

Examples

## Not run: 
mat <- matrix(100:1,ncol = 10, byrow = F)
cor <- grDevices::heat.colors(100)
image(mat,axe = FALSE, main = "numbers from 1 to 100", col = cor)
axis(2)
addscale(mat, col = cor)

## End(Not run)

vein documentation built on May 29, 2024, 7:20 a.m.