Reputation: 1372
I display a boxplot chart as following:
But what I would like is to have the x axis as real x axis, meaning that the space between values should be respected. Adding to this scale I would like a log scale on the x axis. How can I do this using geom_boxplot?
thanks, Jerome
Upvotes: 0
Views: 273
Reputation: 54277
what I would like is to have the x axis as real x axis, meaning that the space between values should be respected. Adding to this scale I would like a log scale on the x axis. How can I do this using geom_boxplot?
You could do
set.seed(1)
df <- data.frame(x=rep(c(1,10,50,100), each=10), y=runif(40))
library(ggplot2)
ggplot(df, aes(x, y, group=x)) +
geom_boxplot() +
scale_x_log10() +
theme_minimal()
Upvotes: 2