How do I change the formatting of numbers on an axis with ggplot?

后端 未结 5 982
独厮守ぢ
独厮守ぢ 2020-11-28 01:07

I\'m using R and ggplot to draw a scatterplot of some data, all is fine except that the numbers on the y-axis are coming out with computer style exponent formatting, i.e. 4e

5条回答
  •  离开以前
    2020-11-28 02:04

    Another option is to format your axis tick labels with commas is by using the package scales, and add

     scale_y_continuous(name="Fluorescent intensity/arbitrary units", labels = comma)
    

    to your ggplot statement.

    If you don't want to load the package, use:

    scale_y_continuous(name="Fluorescent intensity/arbitrary units", labels = scales::comma)
    

提交回复
热议问题