title: how to use black-and-white fill patterns instead of color coding on Calendar Heatmap
body: <p>I'm using <a href="https://twitter.com/pbleic" rel="noreferrer">Paul Bleicher</a>'s <a href="https://github.com/jbryer/makeR/blob/master/R/calendarHeat.R" rel="noreferrer">Calendar Heatmap</a> to visualize some events over time and I'm interested to add  <a href="https://www.google.com/search?q=black-and-white+fill+patterns&amp;hl=en&amp;client=firefox-a&amp;hs=ow5&amp;rls=org.mozilla:en-US:official&amp;tbm=isch&amp;tbo=u&amp;source=univ&amp;sa=X&amp;ei=qe4mUd-sCO-zigKnuICoCQ&amp;ved=0CDEQsAQ&amp;biw=1440&amp;bih=716" rel="noreferrer">black-and-white fill patterns</a> instead of (or on top of) the color coding to increase the readability of the Calendar Heatmap when printed in black and white.</p>
  
  <p>Here is an example of the Calendar Heatmap look in color,</p>
  
  <p><img src="https://i.stack.imgur.com/RPDEk.png" alt="Calendar Heatmap color"></p>
  
  <p>and here is how it look in black and white,</p>
  
  <p><img src="https://i.stack.imgur.com/r63MC.png" alt="Calendar Heatmap black and white"></p>
  
  <p>it gets very difficult to distinguish between the individual levels in black and white.</p>
  
  <p>Is there an easy way to get R to add some kind of patten to the 6 levels instead of color?</p>
  
  <h3>Code to reproduce the Calendar Heatmap in color.</h3>
  
  <pre><code>source("http://blog.revolution-computing.com/downloads/calendarHeat.R")
  
  stock &lt;- "MSFT"
  start.date &lt;- "2012-01-12"
  end.date &lt;- Sys.Date()
  
  quote &lt;- paste("http://ichart.finance.yahoo.com/table.csv?s=", stock, "&amp;a=", substr(start.date,6,7), "&amp;b=", substr(start.date, 9, 10), "&amp;c=", substr(start.date, 1,4), "&amp;d=", substr(end.date,6,7), "&amp;e=", substr(end.date, 9, 10), "&amp;f=", substr(end.date, 1,4), "&amp;g=d&amp;ignore=.csv", sep="")
  stock.data &lt;- read.csv(quote, as.is=TRUE)
  
  # convert the continuous var to a categorical var 
  stock.data$by &lt;- cut(stock.data$Adj.Close, b = 6, labels = F)
  
  calendarHeat(stock.data$Date, stock.data$by, varname="MSFT Adjusted Close")
  </code></pre>
  
  <h3>update 02-13-2013 03:52:11Z, what do I mean by <em>adding a pattern</em>,</h3>
  
  <p>I envision adding a pattern to the individual day-boxes in the Calendar Heatmap as pattern is added to the individual slices in the pie chart to the right (<strong>B</strong>) in this plot,</p>
  
  <p><img src="https://i.stack.imgur.com/zRwlo.jpg" alt="new-features.html#patterns"></p>
  
  <p>found <a href="http://www.press.uchicago.edu/journals/an/prep-art.html?journal=an#halftones" rel="noreferrer">here</a> something like the states in <a href="http://www.softill.com/new-features.html#patterns" rel="noreferrer">this plot</a>.</p>