title: How to set decimal point in y-axis in ggplot?
body: <p>Here is the reproducible dataframe.</p>
  
  <pre><code>variable &lt;- c("A1","B1","C1","D1","A1","B1","C1","D1","A1","B1","C1","D1")
  period &lt;- c("P1","P1","P1","P1","P2","P2","P2","P2","P3","P3","P3","P3")
  
  coef &lt;- runif(12, -1, 1)
  coef_lb &lt;- coef-0.3
  coef_ub &lt;- coef+0.3
  
  df&lt;- data.frame(variable,period,coef,coef_lb,coef_ub)
  
  df$period &lt;- factor(df$period,levels=c("P1","P2","P3"))
  
  library(ggplot2)
  bpdiaplot &lt;- ggplot(data=df,aes(x=period,y=coef))
  bpdiaplot &lt;- bpdiaplot + facet_grid(.~variable,labeller = label_parsed)
  bpdiaplot &lt;- bpdiaplot + geom_pointrange(aes(ymin=coef_lb,ymax=coef_ub))
  bpdiaplot &lt;- bpdiaplot + geom_point() 
  bpdiaplot &lt;- bpdiaplot + scale_y_continuous(limits=c(-1.4, 1.4),breaks=seq(-1.4, 1.4, by = 0.3))
  bpdiaplot &lt;- bpdiaplot + xlab("Period") 
  bpdiaplot &lt;- bpdiaplot + ylab("Mean difference") 
  bpdiaplot &lt;- bpdiaplot + geom_hline(yintercept=0,alpha=0.5)
  bpdiaplot &lt;- bpdiaplot + theme_bw()
  bpdiaplot &lt;- bpdiaplot + theme(axis.text = element_text(colour = "black"))
  bpdiaplot &lt;- bpdiaplot + theme(axis.text.x=element_text(angle = 45, hjust = 1))
  </code></pre>
  
  <p>By changing the "breaks=seq(-1.4, 1.4, by = 0.3))" into "breaks=seq(-1.4, 1.4, by = 0.1))", it returns different decimal point in y-axis.</p>
  
  <p>How can I control the decimal point in y-axis? I would like to have only one decimal point.</p>
  
  <p><a href="https://i.stack.imgur.com/k0O5k.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k0O5k.png" alt="Using breaks=seq(-1.4, 1.4, by = 0.1))"></a></p>
  
  <p>[<img src="https://i.stack.imgur.com/ai9Bs.png" alt="Using breaks=seq(-1.4, 1.4, by = 0.1))[2]"></p>