2
$\begingroup$

By defining the $\log_q$ as: $$ \log_q(x)=\frac{x^{1-q}-1}{1-q}, x \geq 0, q \neq 1$$ how would it be possible to have the equivalent of the LogLogPlot command, meaning that the axes are now defined as $\log_q (x)$ and $\log _q f(x)$?

The reason I am asking this, is because I would like to make a plot of the Tsallis q-Gaussian distributions which are built-in Mathematica Tsallis Q Gaussian and then the equivalent of the LogLogPlot in order to show that these distributions about power laws on a $q$-logarithmic scale.

Thank you.

$\endgroup$
7
  • $\begingroup$ Why not use ParametricPlot[]? $\endgroup$ Commented Jul 11, 2016 at 14:47
  • $\begingroup$ @J.M. Can you please explain in more detailed what do you mean by this suggestion? As far as I am concerned I just know that LogLogPlot defines logarithmic scales on both axes but I am not familiar with the way Mathematica does that, therefore my problem is my lack of ability to manipulate this command. $\endgroup$
    – Bazinga
    Commented Jul 11, 2016 at 14:54
  • 1
    $\begingroup$ A hint: compare LogLogPlot[Exp[x], {x, 1, 5}] and ParametricPlot[{Log[x], Log[Exp[x]]}, {x, 1, 5}, AspectRatio -> 1/GoldenRatio]. (Worry about the ticks later; concentrate on what these transformations are doing mathematically.) $\endgroup$ Commented Jul 11, 2016 at 14:58
  • 1
    $\begingroup$ there is nothing special about LogLog plot. You can always make transformation and then produce special ticks/gridlines, something like this $\endgroup$
    – BlacKow
    Commented Jul 11, 2016 at 15:49
  • 1
    $\begingroup$ Calling that function $\log_q$ is really misleading. That notation is standard for the base-$q$ logarithm. $\endgroup$
    – Szabolcs
    Commented Jul 11, 2016 at 22:09

1 Answer 1

4
$\begingroup$

You might be able to make use of ScalingFunctions.

lq[q_ /; q != 1][x_] := (x^(1 - q) - 1)/(1 - q)
invlq[q_][z_] := Abs[(1 + z - q z)^(1/(1 - q))]

spec[q_] := {{lq[q], invlq[q]}, {lq[q], invlq[q]}};

Plot[x^2, {x, 1, 30}, PlotRange -> All, ScalingFunctions -> spec[0.8]]

enter image description here

This works in Mathematica 10.1 but it is not officially supported, as indicated by the Option name being highlighted in red.

$\endgroup$
3
  • $\begingroup$ In this case, the OP seems to want to plot tqpdf[x_, q_] = PDF[TsallisQGaussianDistribution[q], x]; maybe you can use that example instead (making sure you are using the same q for it and lq[]). For reference: here are complete definitions you can use for spec[]. $\endgroup$ Commented Jul 11, 2016 at 15:11
  • $\begingroup$ @J.M. I really don't know how that should look so I feel uncomfortable with it. $\endgroup$
    – Mr.Wizard
    Commented Jul 11, 2016 at 15:15
  • 1
    $\begingroup$ @Mr.Wizard Thank you, I will take some time to play around with it, perhaps also use the TsallisQGaussianDistribution to see if I get what is expected by it and then I will get back to you. $\endgroup$
    – Bazinga
    Commented Jul 11, 2016 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.