Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

avoid scientific notation x axis ggplot [duplicate]

Tags:

r

This:

ggplot(Data, aes(x = Bla), bins = 30, labels = TRUE, format(x, scientific = FALSE)) +
    geom_histogram()

does not work. I want to suppress the scientific notation (e.g. 1.0e+07). Any ideas? Thanks!

like image 782
cs0815 Avatar asked Jul 16 '26 04:07

cs0815


1 Answers

You can use options(scipen = 999) before you plot.

This will disable scientific notation in general and not only in your x-axis.

like image 178
AntoniosK Avatar answered Jul 17 '26 19:07

AntoniosK