R - stack several Heatmap on top of each others
<p>I would like to stack several heatmap on top of each others, 
a bit like this kind of plot : </p>

<p><a href="https://i.stack.imgur.com/74ac0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/74ac0.png" alt="enter image description here"></a></p>

<p>So, I have two distributions who look like this : 
<a href="https://i.stack.imgur.com/vFl4q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vFl4q.png" alt="enter image description here"></a></p>

<p>I created two heatmap from these distributions : </p>

<pre><code>library(dplyr) 
library(ggplot2) 

dt %&gt;% ggplot(aes(thours, dom)) + geom_tile(aes(fill = d), colour = "white") + 
  scale_fill_gradient(low = "white", high = "blue") + theme_minimal() 

dt %&gt;% ggplot(aes(thours, pay)) + geom_tile(aes(fill = p), colour = "white") + 
  scale_fill_gradient(low = "white", high = "red") + theme_minimal() 
</code></pre>

<p><a href="https://i.stack.imgur.com/BHEAK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BHEAK.png" alt="First distribution"></a></p>

<p><a href="https://i.stack.imgur.com/8t0js.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8t0js.png" alt="Second distribution"></a></p>

<p>Any idea how I could stack these two Heatmap and how to give them a <code>3d</code> aspect ? </p>

<p>data :  </p>

<pre><code> dt = structure(list(thours = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24), p =     c(0.0265858993774188, 
0.0514050143025408, 0.10911997307757, 0.24238600033653, 0.396096247686354, 
0.472572774692916, 0.495961635537607, 0.486118122160525, 0.394750126198889, 
0.379606259464917, 0.466851758371193, 0.45557799091368, 0.402742722530708, 
0.286050816086152, 0.16128218071681, 0.0923775870772337, 0.0760558640417298, 
0.0657075551068484, 0.0538448594985697, 0.0371866060911997,     0.0289416119804812, 
0.02221100454316, 0.0205283526838297, 0.0202759549049302), d = c(0.00370183409052667, 
0.0108531044926805, 0.044253743900387, 0.0971731448763251, 0.124432104997476, 
0.141595153962645, 0.165404677772169, 0.164310954063604, 0.144708059902406, 
0.137725054686185, 0.145381120646138, 0.151522799932694, 0.16464748443547, 
0.193757361601885, 0.200235571260306, 0.171546357058725, 0.110381961972068, 
0.0588086824835941, 0.0334006394077065, 0.0133770822816759, 0.00563688372875652, 
0.00286050816086152, 0.00193504963822985, 0.0021874474171294), 
dom = c("dom", "dom", "dom", "dom", "dom", "dom", "dom", 
"dom", "dom", "dom", "dom", "dom", "dom", "dom", "dom", "dom", 
"dom", "dom", "dom", "dom", "dom", "dom", "dom", "dom"), 
pay = c("pay", "pay", "pay", "pay", "pay", "pay", "pay", 
"pay", "pay", "pay", "pay", "pay", "pay", "pay", "pay", "pay", 
"pay", "pay", "pay", "pay", "pay", "pay", "pay", "pay")), class = "data.frame", .Names = c("thours", 
"p", "d", "dom", "pay"), row.names = c(NA, -24L))
</code></pre>