Do not want scientific notation on plot axis

前端 未结 7 1883
死守一世寂寞
死守一世寂寞 2020-11-30 22:12

I regularly do all kinds of scatter plots in R using the plot command.

Sometimes both, sometimes only one of the plot axes is labelled in scientific not

7条回答
  •  情话喂你
    2020-11-30 22:59

    You can use format or formatC to, ahem, format your axis labels.

    For whole numbers, try

    x <- 10 ^ (1:10)
    format(x, scientific = FALSE)
    formatC(x, digits = 0, format = "f")
    

    If the numbers are convertable to actual integers (i.e., not too big), you can also use

    formatC(x, format = "d")
    

    How you get the labels onto your axis depends upon the plotting system that you are using.

提交回复
热议问题