1
$\begingroup$

This question already has an answer here:

I am trying to plot contour plots and some of them show a white patch because of a change in sign of the points plotted. How can I make the contour plot show this change in sign without having to take the absolute of the values?

The data is the following:

axialP1plot= {{30, 0, 0.509185}, {60, 0, 0.474159}, {90, 0, 0.452413}, {120, 0, 
      0.450468}, {0, 0.6, 0.422016}, {30, 0.6, 0.365962}, {60, 0.6, 
      0.263496}, {90, 0.6, 0.200892}, {120, 0.6, 0.188312}, {0, 1.2, 
      0.316512}, {30, 1.2, 0.140834}, {60, 1.2, -0.129596}, {90, 
      1.2, -0.248149}, {120, 1.2, -0.246671}, {0, 1.8, 0.211008}, {30, 
      1.8, -0.454357}, {60, 1.8, -1.08961}, {90, 1.8, -1.13311}, {120, 
      1.8, -0.979351}, {0, 2.4, 0.105504}, {30, 2.4, -3.50926}, {60, 
      2.4, -3.56817}, {90, 2.4, -2.62564}, {120, 2.4, -1.96434}, {0, 2.9, 
      0.017584}, {30, 2.9, -13.3785}, {60, 2.9, -6.04938}, {90, 
      2.9, -3.59638}, {120, 2.9, -2.49518}, {0, 0, 0.52752}}

And the contour plot:

ListContourPlot[axialP1plot, 
  ColorFunction -> "Rainbow", 
  Contours -> 10, 
  PlotLegends -> Automatic, 
  PlotLabel -> Style["Axial Force on Plate 1", FontSize -> 14]]

Which yields:

enter image description here

$\endgroup$

marked as duplicate by J. M. will be back soon plotting Oct 11 '18 at 8:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 4
    $\begingroup$ specify PlotRange -> All. Its not the sign change but your one extreme negative value the the automatic setting has decided to exclude from the plot range. $\endgroup$ – george2079 Jun 1 '16 at 21:41
  • $\begingroup$ Thank you @george2079. If I follow your suggestion there is no longer a white area. Is there a way to mark/highlight when the change in sign happens on the graph? $\endgroup$ – GEF Jun 6 '16 at 13:10
  • 1
    $\begingroup$ use ALL and also explicitly list the contours you want to include zero (see @dantopa 's answer). $\endgroup$ – george2079 Jun 6 '16 at 13:32
5
$\begingroup$

As george2079 say in his comment to your question, add the option PlotRange -> All

ListContourPlot[axialP1plot,
  PlotRange -> All,
  ColorFunction -> "Rainbow",
  Contours -> 10,
  PlotLegends -> Automatic,
  PlotLabel -> "Axial Force on Plate 1"]

plot

$\endgroup$
  • 1
    $\begingroup$ Surely there must be a similar question answered with PlotRange -> All of which this one may be marked a duplicate? $\endgroup$ – Mr.Wizard Jun 3 '16 at 0:35
3
$\begingroup$

Use Contours -> {0} to force the contour line at zero value.enter image description here

ListContourPlot[axialP1plot, ColorFunction -> "Rainbow", 
 Contours -> {0}, ContourStyle -> {Black, Thick}, 
 PlotLegends -> Automatic, 
 PlotLabel -> Style["Axial Force on Plate 1", FontSize -> 14]]
$\endgroup$

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