[28th March, 2022] FYI: I wrote this a really long time again. I am posting it mostly so I can find it when I need it. You are welcome to provide me with more efficient ways to do this and I would be happy to incorporate them.

One thing I find myself doing all the time is plotting data on a logarithmic scale. Sometimes I have a logarithmic x-axis, a logarithmic y-axis or both. Many people often find logarithmic axes confusing, and so it is helpful if the tick labels are on the original scale. My code here will demonstrate how to do this for base ten logarithms, but it is easy to adapt for any other base.

First we need some exponential data for our example

x = 10^runif(100, 0, 5)
y = 3 * x + 2 + rexp(100)
log.x = log10(x)
log.y = log10(y)

Now we plot the data without the axes but put nice labels on the axes