How to combine multiple surf plots in one plot with different colormap
5 次查看(过去 30 天)
显示 更早的评论
I want to combine three different surf plots, each one with a different colormap, into one plot. I am trying to do something similar to the surf and scatter3 example in the attached figure, but, with surfaces. I am using linkaxes but I am getting a warning: linkaxes requires 2-D axes as input. Use linkprop for generic property linking.
I tried to use linkprop but I couldn't combine the surf plots. I also used hold on and I was able to combine the surfaces but I couldn't have different colormaps. Which command can I use?
0 个评论
采纳的回答
Walter Roberson
2017-6-26
In R2014b or later, perhaps the easiest way to do what you want is to create multiple axes in the same location, setting all but one of the axes to 'off' so that it does not draw any axes box or tick marks, and setting the axes background colors to 'none' for all but the bottom one.
The alternative is to create each plot one by one, and to use freezeColors from the File Exchange to turn them from pseudocolor into RGB, so that each becomes independent of following changes in the color map.
I would suggest to you that using different colormaps for different objects in the same scene is likely to be confusing for people. People are going to tend to expect that the meaning of any one color is consistent between the different objects.
1 个评论
urvashi bothra
2021-9-3
Hi Walter,
I have the similar question. I have generated different surface plot in matlab using surf command and now, I want to represent in a single image but with different colours. Using hold on option leads to 1 colourmap and thus, I cannot distinguish the different surfaces.
Can you please elaborate your answer.
Many thanks,
Urvashi
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Color and Styling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!