title: How to group already stacked bars when using R ggplot and geom_bar
body: <p>I am using the following <code>myggdf</code> data frame in R</p>
  <pre><code>structure(list(Signature = c(1L, 3L, 5L, 1L, 3L, 5L, 1L, 3L, 
  5L, 1L, 3L, 5L), Sample = structure(c(1L, 1L, 1L, 2L, 2L, 2L, 
  3L, 3L, 3L, 4L, 4L, 4L), .Label = c(&quot;F.vcf&quot;, &quot;G.vcf&quot;, &quot;H.vcf&quot;, 
  &quot;I.vcf&quot;), class = &quot;factor&quot;), Contribution = c(638.885179211473, 
  403.558378092796, 237.864729405206, 621.475592580731, 507.076811680132, 
  844.111458945023, 340.773496994329, 693.189161464458, 868.648293203769, 
  350.293155215537, 796.162462388531, 393.009724831982), label = c(&quot;lung&quot;, 
  &quot;lung&quot;, &quot;lung&quot;, &quot;lung&quot;, &quot;lung&quot;, &quot;lung&quot;, &quot;ovary&quot;, &quot;ovary&quot;, &quot;ovary&quot;, 
  &quot;ovary&quot;, &quot;ovary&quot;, &quot;ovary&quot;)), row.names = c(NA, -12L), class = &quot;data.frame&quot;)
  </code></pre>
  <pre><code>   Signature Sample Contribution label
  1          1  F.vcf     638.8852  lung
  2          3  F.vcf     403.5584  lung
  3          5  F.vcf     237.8647  lung
  4          1  G.vcf     621.4756  lung
  5          3  G.vcf     507.0768  lung
  6          5  G.vcf     844.1115  lung
  7          1  H.vcf     340.7735 ovary
  8          3  H.vcf     693.1892 ovary
  9          5  H.vcf     868.6483 ovary
  10         1  I.vcf     350.2932 ovary
  11         3  I.vcf     796.1625 ovary
  12         5  I.vcf     393.0097 ovary
  </code></pre>
  <p>and would like to display the data as stacked bars (Contribution for each Signature) for each Sample, in addition grouped by a label (a tissue type).</p>
  <p>Using the following code</p>
  <pre><code>ggplot(myggdf, aes(x=Sample, y=Contribution, fill=as.factor(Signature))) +
  +     geom_bar(stat=&quot;identity&quot;, position='stack') + facet_grid(~label)
  </code></pre>
  <p>returns <a href="https://i.stack.imgur.com/ylPQ2.png" rel="nofollow noreferrer">this plot</a> that is not too far from what I am expecting.</p>
  <p><strong><em>However, how to get a sample shown only in its appropriate facet ?</em></strong></p>
  <p>Note that I am not that attached to the facet displaying. If there is a solution to cluster stacked bars by label in the same panel, it is all good.</p>
  <p>Thanks for any tip</p>