Force R to stop plotting abbreviated axis labels (scientific notation) – e.g. 1e+00

I think you are looking for this:

require(ggplot2)
df <- data.frame(x=seq(1, 1e9, length.out=100), y=sample(100))
# displays x-axis in scientific notation
p  <- ggplot(data = df, aes(x=x, y=y)) + geom_line() + geom_point()
p

# displays as you require
require(scales)
p + scale_x_continuous(labels = comma)

Leave a Comment