0
$\begingroup$

There appears to be a bug in plotting, using ListContourPlot with ScalingFunctions->{"Log","Log"} and specifying a DataRange, when trying to plot only a 2d array (i.e. with the x- and y- variables specified using DataRange instead of being input). Providing a 2d DataRange gives a blank plot, with PlotRange having no effect. If I include "All" as a 3rd dimension to DataRange, then the plot draws axes as Exp[DataRange].

Could somebody help me around this apparent bug?

$\endgroup$
0
$\begingroup$

It looks like ScalingFunctions does not work with numbers below the base of the logarithm. Conider e.g.: n = 20;

dat = Table[x^2 + y^2, {x, 1, n}, {y, 1, 2 n}];
ListContourPlot[dat, DataRange -> {{1, n}, {1, 2 n}}, 
 ScalingFunctions -> {"Log", "Log2"}]

enter image description here

Or the same with Log10:

n = 20;
dat = Table[x^2 + y^2, {x, 1, n}, {y, 1, 2 n}];
ListContourPlot[dat, DataRange -> {{1, n}, {1, 2 n}}, 
 ScalingFunctions -> {"Log", "Log10"}]

enter image description here

I think this is a bug. Please report it to "support.wolfram.com"

$\endgroup$
2
  • $\begingroup$ What if PlotRange matches DataRange? For example, ListContourPlot[dat, DataRange -> {{1, n}, {1, 2n}}, ScalingFunctions -> {"Log", "Log10"}, PlotRange -> {{E^1, E^n }, {10^1, 10^(2n)}}]. Without the explicit PlotRange, MMA uses “pleasing” axes scales. I don’t think this is a bug. $\endgroup$
    – creidhne
    Nov 9 '20 at 16:15
  • $\begingroup$ Explicitly setting DataRange limits which match the PlotRange does not help; I think there is a bug here. $\endgroup$
    – Mark_in_DK
    Jun 24 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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