plot_color_grid: Plot a grid of colors given a matrix of numbers

Description Usage Arguments Value Examples

View source: R/plot.R

Description

Plot a grid of colors given a matrix of numbers

Usage

1
2
3
4
plot_color_grid(M, block.height = 20, block.width = 10, space.X = 3,
  space.Y = 10, cex.x = 1, cex.y = 1, border = TRUE,
  color_palatte = c("blue", "white", "red"), color_bounds = NA,
  num_colors = 50, main = "", xlab = "", ylab = "")

Arguments

M

matrix of values to plot

block.height

element height, default 20

block.width

element width, default 10

space.X

space between elements on horizontal axis, default 3

space.Y

space between elements on vertical axis, default 10

cex.x

cex value for x axis

cex.y

cex value for y axis

border

boolean, draw a border around grid elements

color_palatte

vector of colors c(cold,middle,hot), defaults to c("blue", "white", "red")

color_bounds

two element vector with lower and upper limit for color palatte, defaults to c( min(M), max(M) )

num_colors

number of color gradations in palatte, default 50

main

Plot main title, default blank.

xlab

Plot x axis label, default blank.

ylab

Plot y axis label, default blank.

Value

M, including possible truncation from color bounds

Examples

1
2
3
4
5
M = matrix(1:12, nrow=3, ncol=4,byrow=TRUE)
plot_color_grid(M)
dimnames(M)[[1]] = c("row_a","row_b","row_c")
dimnames(M)[[2]] = c("col1", "col2", "col3","col4")
plot_color_grid(M, color_palatte=c("blue","white","yellow" ) )

DavidQuigley/HTDoseResponseCurve documentation built on Jan. 23, 2021, 5:10 a.m.