I have the following function for which I want to generate a LogPlot for:

JB[dB_, M_, a_] := (10^(dB/10) M (M - 1) (2 M - 1))/3 + ((a - 1) (2 a - 1))/(Pi^2 (a - 2))

A simple LogPlot[1/JB[x, 16, 1], {x, -40, 15}] generates the following desired output:


However, if I try to first generate the data and then make a plot, I get different results. Namely:

Boundresults = Table[{x, Log[1/JB[x, 16, 1]] // N}, {x, -40, 15, 0.01}];

which generates:


Why are the two results different?

  • $\begingroup$ @user6014, version 11.3 $\endgroup$
    – Sid
    May 9, 2019 at 17:14
  • 1
    $\begingroup$ If you use Log10 instead of Log you get an equivalent plot. $\endgroup$
    – MelaGo
    May 9, 2019 at 20:16

1 Answer 1


To make a log plot, you need to scale both the data and the vertical axis. Your ListPlot only scales the data. Why not use ListLogPlot:


enter image description here

or ListPlot with scaling functions:

ListPlot[Table[{x,1/JB[x,16,1]//N},{x,-40,15,0.01}], ScalingFunctions->{None, "Log"}]

enter image description here


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.