I have a plot of some data that I believe should be approximate log^2(n) = log(n)^2
. I want to plot n
on the horizontal axis and the data on the vertical axis, but I want to scale the horizontal axis by log^2
so that I get approximately a straight line. Now, I know how to do this with just log
instead of log^2
(eg, use semilogx
), but I don't know how to do it for log^2
.
I tried doing set(gca,'xscale','log') to give log
scaling, and then running the same thing again, hoping that this would rescale by log
again. Unfortunately it didn't. (I believe) the only options for 'xscale'
are linear
and log
.
I've had a look around the usual forums (via a Google search), but I can't find the solution. There's lots on the question of just log
scaling, and there's some on changing the base of the logarithm (not what I want to do). Any advice on this matter would be most appreciated! Thanks
Let me just add a clarification. In probability theory (which is what I do), it's common to write log^2(n)
for log(n)^2
. You talk about a mixing time being "log squared"; so this notation means that you can drop the n
and still say ~ log^2
. So I believe my data is approximate log(n)^2
.