title: Rotate a matrix 45 degrees and visualize it using ggplot
body: <p>I have plot quite easily a matrix (thus giving a heatmap) with <code>ggplot</code> like this:</p>
  
  <pre><code>test &lt;- data.frame(start1=c(1,1,1,1,2,2,2,3,3,4),start2=c(1,2,3,4,2,3,4,3,4,4),logFC=c(5,5,1,0,8,0,5,2,4,3))
  ggplot(test, aes(start1, start2)) +
    geom_tile(aes(fill = logFC), colour = "gray", size=0.05) +
    scale_fill_gradientn(colours=c("#0000FF","white","#FF0000"), na.value="#DAD7D3")
  </code></pre>
  
  <p>Since I have only the lower part of the heatmap, it gives this plot:</p>
  
  <p><a href="https://i.stack.imgur.com/QDRwI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QDRwI.png" alt="enter image description here"></a></p>
  
  <p>But I would like to rotate the matrix 45 degrees, just like I can find here: <a href="https://stackoverflow.com/questions/18577092/visualising-and-rotating-a-matrix">Visualising and rotating a matrix</a>. So, <strong>the diagonal next to the X axis</strong>. However, they use the graphics from R without <code>ggplot</code>. Do you have any idea how to do that with <code>ggplot</code>?</p>