5

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?

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
Chris
  • 51
  • 1

1 Answers1

0

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).

Stephen Powell
  • 1,061
  • 5
  • 13