how to change x-axis limits ggplot2 r
<p>I would like to set limit for x-axis using ggplot bar plot. The whole plot is ok, but when I use ylim(1,6) (these are limits what I need) the bars disappear.</p>

<p>Data:</p>

<pre><code>var.A &lt;- as.numeric(c(1:13))
var.B &lt;- c(4.351833, 2.938000, 4.726465, 3.747162, 3.720737, 4.297117, 4.304500, 4.061277, 4.595236, 4.105444, 3.701684, 3.523563, 4.170000)
df &lt;- data.frame(var.A,var.B)
</code></pre>

<p>Ggplot code:</p>

<pre><code>    ggplot(df, aes(x=factor(var.A), y=var.B)) + 
  geom_bar(position=position_dodge(), stat="identity", fill="#fff68f", colour="darkgrey", width = 0.4) +
  coord_flip()+
  xlab("") +
  ylab("") +
  scale_x_discrete(labels=c("aaaaaaa aaaaa","bbbbb bbb bbbb","cccc ccc","dddd dd ddddd",
                            "eee e eeeee e ee","ffffffff","gggggggg","hhhhhhh","iiii",
                            "jjjjjj","kkkkkkk","llllll","mmmmmmmm"))
</code></pre>

<p>And when I add: <code>ylim(1,6) +</code> things are going wrong.</p>

<p>And another thing. The color of every bar is set as <code>fill="#fff68f"</code>. Is there any solution to change color of one bar, for example the first from top I'd like to be different, i.e. <code>#ee2c2c</code>.</p>