5
$\begingroup$

This question already has an answer here:

I seem to have found a bug with LogLogPlot in Version 10. If I specify a working precision, the function produces total garbage. Here is a simple example. The first case, without WorkingPrecision specified works fine. The second case, with WorkingPrecision specified, produces garbage.

LogLogPlot[{1/10, 1, 2, 3}, {p, 0.1, 10000}, PlotLegends -> "Expressions"]

enter image description here

LogLogPlot[{1/10, 1, 2, 3}, {p, 0.1, 10000}, 
  PlotLegends -> "Expressions", WorkingPrecision -> 16]

enter image description here

If WorkingPrecision is not a specifiable option for LogLogPlot, why doesn't Mathematica warn me? I know it's OK to specify WorkingPrecision for normal plots. Any ideas?

$\endgroup$

marked as duplicate by Szabolcs, dr.blochwave, Alexey Popkov, m_goldberg, Mr.Wizard Jul 24 '15 at 10:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    $\begingroup$ confirmed (v9). The plot itself seems to become linear, and the axis labels garbage. $\endgroup$ – george2079 Feb 18 '15 at 18:32
  • 1
    $\begingroup$ Confirmed 10.0.2.0, even without the PlotLegends->"Expressions" option. $\endgroup$ – evanb Feb 18 '15 at 21:13
  • $\begingroup$ I don't know if this has been reported as a bug to Wolfram yet, but I can confirm the same behavior in v9.0 and v10.0 (Windows 7). $\endgroup$ – Stephen Powell Jul 24 '15 at 7:09
0
$\begingroup$

With LogLogPlot[..., WorkingPrecision->_] (or indeed LogPlot[..., WorkingPrecision->_]), what is plotted is in fact the exponential of the function. As a workaround (assuming that's what you're looking for), you can use

LogLogPlot[Evaluate@Log[{1/10, 1, 2, 3}], {p, 0.1, 10000}, PlotLegends -> "Expressions", WorkingPrecision -> 16]

which produces something very similar to your first figure (but this legend is incorrect, of course).

$\endgroup$

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