I had an equation in which I replaced two of my variables k and n with their logarithmic counterpart variables logk and logn as follows :

eq = (Binomial[n, 2]*(3.97887*10^-10 Cos[200 k ArcSinh[50/k]])/
       Sqrt[1 + 2500/k^2] == -0.00003 // Rationalize) /. {n -> 
    10^logn, k -> 10^(-logk)}

Then I solved for one of the variables logn :

solk[logn_] := 
 logk /. NSolve[{(1.9894350000000002`*^-10 10^logn (-1 + 10^logn) Cos[
          200 (10^-logk)* ArcSinh[5*10^2 (10^logk)]])/
       Sqrt[1 + (25*10^2 10^(2 logk))] == -(3/10000), -65 < logk < 0},
     logk, Reals][[1]]

And finally plotted :

p1 = Plot[2.0*solk[logn], {logn, 0, 23}, 
  PlotRange ->All]

The plot I get has the y-axes and x-axes values as the powers of 10 (since my base of log is 10).

I just want to convert to the normal values i.e. for example instead of showing 0,1,2,..,23 on x-axis I would like to show 10^1, 10^2,..., 10^23 How can I do this?

The answer could be in either of two formats :-

i) Truly converting the x and y values to decimal scale and showing as such on the plot

ii) Merely a relabelling of the values shown on the axis.

It seems trivial but I can't figure it out!

Note : A small caveat is to note that I have values which range upto 10^23 in the calculation and I can't just use k and n instead of logk and logn because of some reason.

  • $\begingroup$ Ummm... what is logn? What is logk? $\endgroup$ Apr 25, 2020 at 23:36
  • $\begingroup$ @DavidG.Stork It is mentioned in the first codeblock. Basically n = 10^logn and k=10^-logk. They are just scaled variables related to n and k $\endgroup$
    – Nitin
    Apr 25, 2020 at 23:53


Your Answer

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

Browse other questions tagged or ask your own question.