1
$\begingroup$

When I execute the following,

ListContourPlot[{{0, 0, 0, 0}, {0, 1, 1, 0}, {0, 1, 1, 0}, {0, 0, 0, 
   0}}]

the output is not symmetric in two directions, which can be seen from the following:

enter image description here

How can I resolve this issue?

$\endgroup$
1
  • 2
    $\begingroup$ You could try ListContourPlot[{{0, 0, 0, 0}, {0, 1, 1, 0}, {0, 1, 1, 0}, {0, 0, 0, 0}}, InterpolationOrder -> n], wheren takes on different values. Try n=3. $\endgroup$
    – march
    Commented Dec 14, 2021 at 17:42

1 Answer 1

4
$\begingroup$

You can add an explicit InterpolationOrder directive. The default is no interpolation (i.e. InterpolationOrder -> None).

With:

list = {{0, 0, 0, 0}, {0, 1, 1, 0}, {0, 1, 1, 0}, {0, 0, 0, 0}};

In your case:

ListContourPlot[list, InterpolationOrder -> #] & /@ Range[1, 3]

contour plots with different interpolation orders. Results are now symmetrical, but interpolation order 1 is jagged; order 2 and 3 are both smoother and similar

$\endgroup$

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.