Group Abstract Group Abstract

Message Boards Message Boards

0
|
6.3K Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Set a ListContourPlot with ColorFunction

Posted 6 years ago

Hi,

I have an array of 2D data of form {{X, Y, A}, ...}, which I want to plot using ListContourPlot. The dependent variable A is integer and can have values from 1 to 8. ListContourPlot is working fine with the default colors. Though, I want to fix the color corresponding to each A value in the range 1 - 8. When I try it using ColorFunction/Which, all colors are messed up with incorrect o/p graphic. Attached file has the data with illustrations as how ListContourPlot behaves with/without ColorFunction.

In the file, the given data should show three different colors, but on using ColorFunction, two colors are replaced by BLACK, which is not even given for any value of A in RGB terms.

Will appreciate any suggestion. Thanks

Attachments:
POSTED BY: S G
3 Replies
Posted 6 years ago

Thanks for the suggestion.

Using ColorFunctionScaling -> False, fixes one of the colors, but not completely fine yet. The color representing A = 2 is still not showing in the graphic, replaced by black. I am attaching the modified file.

Attachments:
POSTED BY: S G
Posted 6 years ago
POSTED BY: Rohit Namjoshi
Posted 6 years ago

Hi SG

Does adding ColorFunctionScaling -> False to the second plot produce the desired result?

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