Title: | Plotting Paintmaps |
---|---|
Description: | Plots matrices of colours as grids of coloured squares - aka heatmaps, guaranteeing legible row and column names, without transformation of values, without re-ordering rows or columns, and without dendrograms. |
Authors: | Daniel Greene |
Maintainer: | Daniel Greene <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0 |
Built: | 2025-01-23 04:23:57 UTC |
Source: | https://github.com/cran/paintmap |
Plots matrices of colours as grids of coloured squares - aka heatmaps, guaranteeing legible row and column names, without transformation of values, without re-ordering rows or columns, and without dendrograms.
The function ‘bhm’ takes a matrix of colours (i.e. a character matrix of descriptions like red or hex-codes), and creates a plot using ‘grid’ graphics.
Daniel Greene Maintainer: Daniel Greene <[email protected]>
paintmap(matrix(heat.colors(9), 3, 3, dimnames=list(letters[1:3], letters[4:6])))
paintmap(matrix(heat.colors(9), 3, 3, dimnames=list(letters[1:3], letters[4:6])))
Given a numeric matrix, assign to each cell a color (character) value based on linearly interpolating a given vector of colors.
color_matrix(x, colors = heat.colors(10))
color_matrix(x, colors = heat.colors(10))
x |
Numeric or logical matrix. |
colors |
Character vector of colors. |
Character matrix.
Given a numeric matrix, assign to each cell a colour (character) value based on linearly interpolating a given vector of colours.
colour_matrix(x, colours = heat.colors(10))
colour_matrix(x, colours = heat.colors(10))
x |
Numeric or logical matrix. |
colours |
Character vector of colours. |
Character matrix.
Get number of inches high a putative heatmap will be
inches_tall(x, row_lines = 1)
inches_tall(x, row_lines = 1)
x |
Character matrix of colours |
row_lines |
Numeric value determining number of lines width each row of the heatmap should occupy. |
Numeric value.
Get number of inches across a putative heatmap will be
inches_wide(x, col_lines = 1)
inches_wide(x, col_lines = 1)
x |
Character matrix of colours |
col_lines |
Numeric value determining number of lines width each column of the heatmap should occupy. |
Numeric value.
Lines of space between the heatmap and row/column labels
lines_between_hm_and_labels
lines_between_hm_and_labels
An object of class numeric
of length 1.
Lines of space at margins of paintmap
margin_lines
margin_lines
An object of class numeric
of length 1.
Plot paintmap
paintmap(x, add = FALSE, ...)
paintmap(x, add = FALSE, ...)
x |
Character matrix of colours |
add |
Add ink to current viewport. |
... |
Other graphical parameters for the rectangles of the grid to pass to |
Plots heatmap.
paintmap(matrix(heat.colors(9), 3, 3, dimnames=list(letters[1:3], letters[4:6])))
paintmap(matrix(heat.colors(9), 3, 3, dimnames=list(letters[1:3], letters[4:6])))