2
$\begingroup$

I am having some issue with ListContourPlot. When I define the following Array:

B = {{1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 0.97561`, 
0.97959`, 0.98889`, 0.97778`}, {1, 1, 1, 1, 1, 0.9875`, 0.9798`, 
0.96552`, 0.97895`, 1}, {1, 1, 0.95455`, 1, 0.94667`, 0.96591`, 1, 
0.97143`, 0.96721`, 0.92593`}, {1, 0.98148`, 0.98485`, 0.975`, 
0.93269`, 0.94059`, 0.94776`, 0.92053`, 0.85976`, 0.9058`}, {1, 1, 
0.97183`, 0.8972`, 0.89167`, 0.86667`, 0.86429`, 0.85083`, 
0.81006`, 0.84422`}}

And then try to do a ListContourPlot of it, with the result being:

enter image description here

The top RHS of the graph should be shaded darkest, as these numbers here are the lowest, however, at the moment as you can see they are shaded as white (indicating that the numbers here are high).

Does anyone know what I am doing wrong here? And, how can I make the shading behave as I expect it to?

Best,

Ben

$\endgroup$
  • $\begingroup$ ListContourPlot[B, PlotLegends -> Automatic, PlotRange -> Full, Contours -> 20] $\endgroup$ – Dr. belisarius Dec 4 '14 at 15:46
3
$\begingroup$

Mathematica clips these regions because it tries to make a clever decision about what is interesting for you. You can force the coloring of those parts by using

ListContourPlot[B, ClippingStyle -> Automatic]

Mathematica graphics

$\endgroup$
  • $\begingroup$ many thanks, that really helps. $\endgroup$ – ben18785 Dec 4 '14 at 15:33

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.