Package 'paintmap'

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

Help Index


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.

Details

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.

Author(s)

Daniel Greene Maintainer: Daniel Greene <[email protected]>

Examples

paintmap(matrix(heat.colors(9), 3, 3, dimnames=list(letters[1:3], letters[4:6])))

Convert numeric matrix to color (character) matrix

Description

Given a numeric matrix, assign to each cell a color (character) value based on linearly interpolating a given vector of colors.

Usage

color_matrix(x, colors = heat.colors(10))

Arguments

x

Numeric or logical matrix.

colors

Character vector of colors.

Value

Character matrix.


Convert numeric matrix to colour (character) matrix

Description

Given a numeric matrix, assign to each cell a colour (character) value based on linearly interpolating a given vector of colours.

Usage

colour_matrix(x, colours = heat.colors(10))

Arguments

x

Numeric or logical matrix.

colours

Character vector of colours.

Value

Character matrix.


Get number of inches high a putative heatmap will be

Description

Get number of inches high a putative heatmap will be

Usage

inches_tall(x, row_lines = 1)

Arguments

x

Character matrix of colours

row_lines

Numeric value determining number of lines width each row of the heatmap should occupy.

Value

Numeric value.


Get number of inches across a putative heatmap will be

Description

Get number of inches across a putative heatmap will be

Usage

inches_wide(x, col_lines = 1)

Arguments

x

Character matrix of colours

col_lines

Numeric value determining number of lines width each column of the heatmap should occupy.

Value

Numeric value.


Lines of space between the heatmap and row/column labels

Description

Lines of space between the heatmap and row/column labels

Usage

lines_between_hm_and_labels

Format

An object of class numeric of length 1.


Lines of space at margins of paintmap

Description

Lines of space at margins of paintmap

Usage

margin_lines

Format

An object of class numeric of length 1.


Plot paintmap

Description

Plot paintmap

Usage

paintmap(x, add = FALSE, ...)

Arguments

x

Character matrix of colours

add

Add ink to current viewport.

...

Other graphical parameters for the rectangles of the grid to pass to grid function gpar, in turn passed to grid function grid.rect.

Value

Plots heatmap.

Examples

paintmap(matrix(heat.colors(9), 3, 3, dimnames=list(letters[1:3], letters[4:6])))