title: How to produce a heatmap with ggplot2?
body: <p>I am trying to produce a heat map using ggplot2. I found <a href="http://learnr.wordpress.com/2010/01/26/ggplot2-quick-heatmap-plotting/" rel="noreferrer">this example</a>, which I am essentially trying to replicate with my data, but I am having difficulty. My data is a simple .csv file that looks like this:</p>
  
  <pre><code>people,apple,orange,peach
  mike,1,0,6
  sue,0,0,1
  bill,3,3,1
  ted,1,1,0
  </code></pre>
  
  <p>I would like to produce a simple heat map where the name of the fruit is on the x-axis and the person is on the y-axis. The graph should depict squares where the color of each square is a representation of the number of fruit consumed. The square corresponding to <code>mike:peach</code> should be the darkest. </p>
  
  <p>Here is the code I am using to try to produce the heatmap:</p>
  
  <pre><code>data &lt;- read.csv("/Users/bunsen/Desktop/fruit.txt", head=TRUE, sep=",")
  fruit &lt;- c(apple,orange,peach)
  people &lt;- data[,1]
  (p &lt;- ggplot(data, aes(fruit, people)) + geom_tile(aes(fill = rescale), colour = "white") +    scale_fill_gradient(low = "white", high = "steelblue"))
  </code></pre>
  
  <p>When I plot this data I get the number of fruit on the x-axis and people on the y-axis. I also do not get color gradients representing number of fruit. How can I get the names of the fruits on the x-axis with the number of fruit eaten by a person displayed as a heat map?
  The current output I am getting in R looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/WxKx5.png" alt="enter image description here"></p>