Group Abstract Group Abstract

Message Boards Message Boards

1
|
7.3K Views
|
5 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Odd coloring of ContourPlot

Posted 11 years ago
POSTED BY: David Keith
5 Replies
Posted 11 years ago

Thanks very much, guys. This will be useful.

POSTED BY: David Keith

I've had to resort to a related trick when my contours contain singularities:

Notice that I don't use the Min in the ContourPlot argument, but set it with PlotRange.

p4 = ContourPlot[Exp[2 (-x^2 - y^2)], {x, -1, 1}, {y, -1, 1}, 
  Contours -> Range[.1, 1, .1], PlotLegends -> Automatic, 
  ColorFunction -> "Temperature", PlotPoints -> 100, 
  ContourLabels -> All, PlotRange -> {0, 0.51},
  ColorFunctionScaling -> False, 
  ClippingStyle -> ColorData["Temperature"][0.51]]

enter image description here

For example compare:

ContourPlot[1/(1 - Exp[2 (-x^2 - y^2)]), {x, -1, 1}, {y, -1, 1}, 
 PlotLegends -> Automatic, ColorFunction -> "Temperature", 
 PlotPoints -> 100, ContourLabels -> All, PlotRange -> {0, 10}]

enter image description here to

ContourPlot[1/(1 - Exp[2 (-x^2 - y^2)]), {x, -1, 1}, {y, -1, 1}, 
    PlotLegends -> Automatic, ColorFunction -> "Temperature", 
    PlotPoints -> 100, ContourLabels -> All, PlotRange -> {0, 10},
    ClippingStyle -> ColorData["Temperature"][1]]

enter image description here

POSTED BY: W. Craig Carter
Posted 11 years ago
POSTED BY: David Keith

Hi David,

regarding that white ring: Try the option "Exclusions -> None"

Henrik

POSTED BY: Henrik Schachner

Adding ColorFunctionScaling->False makes the incongruity go away - the other contours are darker.

The coloring behavior is incorrect. Roughly similar problem reports exist.

POSTED BY: Bruce Miller
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard