title: My R plot is displaying its axes completely incorrectly, can someone tell me why?
body: <p>I have used the following dataframe:</p>
  <pre><code>dataframe1 = data.frame(x1 = numeric(), x2 = character(), x3 = character(),
                          stringsAsFactors = FALSE)
  dataframe1
  dataframe1[1,] = c(8.10136702697, &quot;Uncleared&quot;, &quot;Before&quot;)
  dataframe1[3,] = list(0.24816604371, &quot;Uncleared&quot;, &quot;After&quot;)
  dataframe1[2,] = list(4.47101137777, &quot;Cleared&quot;, &quot;Before&quot;)
  dataframe1[4,] = list(12.32421000000, &quot;Cleared&quot;, &quot;After&quot;)
  
  </code></pre>
  <p>and used the following code to plot:</p>
  <pre><code>plot =  ggplot(dataframe1) +
    geom_bar(aes(x = x3, y = x1, fill = factor(x2)), 
             stat=&quot;identity&quot;, position = &quot;stack&quot;, width = 0.7) +
    coord_cartesian(ylim = c(0, 10)) +
    scale_fill_manual('',  values = c(&quot;red&quot;, &quot;blue&quot;), labels = c(&quot;Uncleared&quot;, &quot;Cleared&quot;)) +
    labs(x=&quot;CCP&quot;,y=&quot;Nominal&quot;) +
    theme_bw(base_size = 14)
  </code></pre>
  <p>However, for some reason my axes are completely messed up. They are misaligned and more importantly, the two blocks stacked together should be the same length on a normal axis but instead I have something completely different. Can someone understand where its going wrong, I cannot figure it out</p>