title: ggplot in R - geom_tile with color-splitted tiles
body: <p>Suppose I have a data where group1 and group2 both assign an integer value from 0 to 4 to the entities a,b,c,d,e, so:</p>
  <pre><code>data &lt;- data.frame(data_id = c(letters[1:5], letters[1:5]), data_group =  c(replicate(5, &quot;Group1&quot;), replicate(5, &quot;Group2&quot;)), data_value = c(0:4, replicate(5,2))) 
  </code></pre>
  <p>I want to plot these values using <code>geom_tile()</code> from the <strong>ggplot</strong> package in R:</p>
  <pre><code>ggplot(data, aes(x=data_value, y=data_id)) + 
    geom_tile(aes(fill = data_group), width = 0.4, height = 0.8)
  </code></pre>
  <p>The graph looks like this:</p>
  <p><a href="https://i.stack.imgur.com/O9Q7c.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/O9Q7c.jpg" alt="enter image description here" /></a></p>
  <p>My problem is that for entity <em>c</em> Group1 and Group2 both assign the same value 2, but the red tile is overlayed by the blue one. Ideally, I would like to have a splitted tile in this case, that is half-red, half-blue. Does anyone have an idea of how to do this?</p>
  <p>Many thanks in advance!</p>