How to make ggplot2 plots prettier?

前端 未结 2 1073
有刺的猬
有刺的猬 2021-02-09 04:08

I have generated the following plot using the R code that follows it: \"alt

ggplot(lengths, aes(leng         


        
2条回答
  •  悲哀的现实
    2021-02-09 04:50

    1: + scale_x_continuous(breaks=rep(5000,12)).

    You could also put the xlim declaration in here, using limits, eg,

    + scale_x_continuous(breaks=rep(5000,12),limits=c(0,60000))
    

    2: For the labels you could use annotate() or geom_text(). See this post for examples. You would have to calculate the values yourself for this though.

提交回复
热议问题