Hi all, say I construct a plot using the following:
library(ggplot2)
myData <- data.frame("xVar" = c(1, 2, 4, 8, 16, 32, 64, 128, 256),
"yVar" = 1:9)
ggplot(data = myData, aes(x = xVar, y = yVar)) +
geom_line() +
scale_x_continuous(trans = "log2")
I have intentionally plotted the original values on a log2-transformed x axis, rather than transform the values themselves so as to preserve some interpretability of the values. To make it more immediately obvious that the x axis is transformed, I would like to set the minor grid line breaks to show the cycles of each decade, as shown here:
https://msu.edu/course/fsc/441/6cycle.gifIs there a way of doing this for both this log2 transformation, and for log10 transformations also?
Many thanks
Hefin