I have data that have exponential behavior in positive and negative direction. How can I log-scale them in ggplot?
Example:
dat <- data.frame(x=sample(c(exp(runif(100,0,10)),-exp(runif(100,0,10)))))
ggplot(dat, aes(seq_along(x),x)) +
geom_point()
Not working
dat <- data.frame(x=sample(c(exp(runif(100,0,10)),-exp(runif(100,0,10)))))
ggplot(dat, aes(seq_along(x),x)) +
geom_point() +
scale_y_continuous(trans='log')
Thanks :)