title: Limit the frame of a barplot in ggplot2
body: <p>I'm trying to produce a barplot with ggplot2. I came up with the problem that the margin of my diagram is proceeding to the right even the limit of the x-axes was set by <code>scale_x_discrete</code>. How can I limit the diagram frame to end with the bar of December?</p>
  
  <p>Here is the code:</p>
  
  <pre><code>mean&lt;-c(36.7, 17.3, 25.6, 41.5, 135.9, 203.9, 289.5, 277.8, 163.2, 67.4, 45, 44)
  month&lt;-c(1,2,3,4,5,6,7,8,9,10,11,12)
  mean_CH&lt;-data.frame(month, mean)
  
  
  p&lt;-ggplot(data=mean_CH, aes(x=month, y=mean)) + geom_bar(stat="identity", fill="light blue") +
      ylab(expression(atop(paste("XXX "),paste("(XX"," ", XX^-1, " ", X^-1, " ", XX^-1,")", sep=""))))+
      scale_x_discrete(breaks=c("1","2","3","4","5","6","7","8","9","10","11", "12"),
      labels=c("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"))+
      ggtitle("XXX")+
      theme_bw()
  </code></pre>
  
  <p>Here is my result:
  <a href="https://i.stack.imgur.com/rE0aF.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rE0aF.jpg" alt="enter image description here"></a></p>