I want to create a ggplot heatmap in R with the use of the command
ggplot() +
geom_tile()
I have the following data
t_1 = c(-1,0,1,4)
t_2 = c(-2,-1,3)
W = c(1,10,3,4,17,9)
The t_1 corresponds to intervals in x-axis, i.e. corresponds to (-1,0), (0,1), (1,4). And t_2 to intervals in the y-axis, i.e. (-2,-1),(-1,3).
Based on these intervals a grid of 6 squares is created and on each square a value of W corresponds. So the value W[1] corresponds to the square (-1,0),(-2,-1), the value W[2] corresponds to the square (-1,0),(-1,3) etc.
So, how do I create that kind of heatmap??

