maycca
maycca

Reputation: 4090

R, ggpubr: Disable exponents on logaritmic scale axis and use integer numbers instead

I am trying to plot my data using logarithmic scales on y and x axis. But, I would like to disable exponent notation on logarithmic scale on my plot. Instead of 10^0,10^1,10^2, I would like to have 1, 10, 100...

Please, how can I accomplish this within ggpubr package?

enter image description here

Dummy data:

require(ggpubr)

data(cars)
p <- ggscatter(cars, x = "speed", y = "dist")

p + yscale("log10", .format = TRUE)

Upvotes: 1

Views: 332

Answers (1)

Julius Vainora
Julius Vainora

Reputation: 48221

Setting format to FALSE (the default value) gives that:

p + yscale("log10")

enter image description here

Upvotes: 3

Related Questions