How can I use multiple colormaps for contour plots ?
Show older comments
In a 2D plot,I computed the probability distribution of some clusters. Now i want, for each cluster, to plot a contour plot of the cluster distribution. In order to be able to differentiate the different clusters, I want to have different color for the lines of each clusters. Moreover, I want lines that depends on the level of distribution.
For example, if a cluster color is red, I want to plot 20 contour lines (designed by contour) :
- For low level lines : black lines
- For high level lines : red lines
By now, I manage to choose the line color but it's the same color for every line of one cluster. I also tried to create one axis for each cluster but the colormap applied at the end is the the one from the last cluster.
To give an exemple, this image shows the scattered points and three clusters

What I'm trying to obtain is this (I merged 3 images in the following) :

Accepted Answer
More Answers (0)
Categories
Find more on Red in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!