title: How to plot seperate bar graph for each repeated factors using ggplot
body: <p>Given Data sets are :</p>
  
  <pre><code>df &lt;- data.frame(var =c("a","b","c","a","b","d") , value = c(1:6))
  
  &gt; df
    var value
  1   a     1
  2   b     2
  3   c     3
  4   a     4
  5   b     5
  6   d     6
  &gt; str(df)
  'data.frame':   6 obs. of  2 variables:
   $ var  : Factor w/ 4 levels "a","b","c","d": 1 2 3 1 2 4
   $ value: int  1 2 3 4 5 6
  &gt; 
  </code></pre>
  
  <p>Here we see variable variables <code>a</code> and <code>b</code> repeated twice , our requirement is 
  to plot bar graph for each variables but for variable <code>a</code> and <code>b</code> ,we need 
  separate bar for each <code>a</code> and <code>b</code> .</p>
  
  <p>i tried below code :</p>
  
  <pre><code>ggplot(data = df , aes(x = var , y = value)) +
         geom_bar(stat = "identity")+
    geom_text(aes(label = value),color="white",fontface = "bold",size =2.5,vjust = 1.8)
  </code></pre>
  
  <p>here value of <code>a</code> and <code>b</code> stacked and ploted in single bar ,please help to fix this</p>
  
  <p><a href="https://i.stack.imgur.com/3baZB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3baZB.png" alt="enter image description here"></a></p>