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

后端 未结 5 990
独厮守ぢ
独厮守ぢ 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 01:51

    I'm late to the game here but in-case others want an easy solution, I created a set of functions which can be called like:

     ggplot + scale_x_continuous(labels = human_gbp)
    

    which give you human readable numbers for x or y axes (or any number in general really).

    You can find the functions here: Github Repo Just copy the functions in to your script so you can call them.

提交回复
热议问题