I want to create a custom heatmap, whereby a matrix defines the intensity (alpha) of a series of squares with uniquely specified colors. Additionally, the axis defining each square will be unique (see example below).
Which packages may help do this? The geom_rect
function from ggplot2
(used in this different question seems promising but too tightly coupled to a given plot?
e.g
Data:
[,1] [,2]
[1,] 30 5
[2,] 3 50
Axis:
x_bounds <- t(matrix(c(
0,10,
10,30
), 2))
y_bounds <- t(matrix(c(
0,-50,
-50,1000
), 2))
Result mock-up: