Equal intervals on log scale I want to make a plot in which the horizontal axis is log scaled, ranging from 1 to 1000. I want to divide the horizontal axis into $n$ equal intervals, where "equal" means that it appears equal in the log axis. For example, if dividing into 2 intervals, they will be [1,?] and [?, 1000] where ? is some value between 10 and 50 according to the appearance of the plot.
In R, if it is not log scale, we can use seq() function.


You can use the ggplot2 package that is using the scales package himself.
the scales function scale_x_log10() define your X axis as log. The break parameter allows you to input a function such as break_width() or pretty_breaks(). However you can also pass a vector as an input.
Therefore all we have to do is to calculate the value of our splits ourselves and send the vector as an argument. Et voila
Even_log_scale_generator<-function(length_axis=1000,splits=10){
  z <- ln(length_axis) # initial axis length scaled to log
  a<-seq(0,z,z/splits) # dividing the scaled axis in splits
  a<-exp(a) #going back to unscaled values
  return(a)
}


y=rnorm(999, 0.02, 0.2)
M = data.frame(X = 1:1000, Y=10)
for (i in 2:1000)
  M[i, "Y"] = M[i-1, "Y"] * (1 + y[i-1])
ggplot(M, aes(x = X, y = Y)) + geom_line() + scale_x_log10(breaks=Even_log_scale_generator(1000,5))

For prettier results you might want to round() the returned vector
