4
$\begingroup$

Bug introduced in 8 or earlier and persisting through 12.0


I want to use ListContourPlot and I have lists such that,

x1 = {0, 2, 4, 6};
y1 = {1, 3, 5, 7};
R1 = {5, 6, 7, 8};
data = Table[{x1[[i]], y1[[i]], R1[[i]]}, {i, 1, 4}];
ListContourPlot[data, DataRange -> {{0, 6}, {1, 7}}, PlotLegends -> Automatic]

plot

When $x1=0$ and $y1=1$ the contour must show that $R1=5$ but I see that it has a contour with a value $1$, not correct. Where do I make a mistake?

$\endgroup$
  • $\begingroup$ I think you need more data to make the correct contour. $\endgroup$ – Sumit Oct 30 '17 at 7:00
4
$\begingroup$

It seems DataRange option works incorrectly in this case. I recommend reporting it as a bug to the tech support. As a workaround you could use InterpolationOrder -> 0:

ListContourPlot[data, PlotLegends -> Automatic, InterpolationOrder -> 0]

plot

$\endgroup$

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.