One figure with two graphics in different colormaps
2 次查看(过去 30 天)
显示 更早的评论
Hello: I want to create a figure where I can superimpose 2 graphics. The first one is a kind of scalar contour. The second one is a surf bathymetry with a different scale. I can draw the two sets well with the following command, but I can’t make the two different colormaps for each “figure” as I would like (I comment these “desired” ouputs). Thanks in advance.
figure
hSlice=slice(X, Y, Z, S2, x1,[], []);
%set(hSlice,'Colormap','deafult')
%colorbar
%freezeColors
shading interp
hold on
hSurface = surf(X,Y,S1);
%set(hSurface,'Colormap','copper')
shading interp
0 个评论
回答(2 个)
Daniel Shub
2013-5-31
MATLAB figures can only have a single colormap. One option is to define your own color map which concatenates the two desired colormaps and then transform the zscale of your second surface to use the extended colormap. You would then have to define your own colorbar functions...
0 个评论
Image Analyst
2013-5-31
Try this: http://www.mathworks.com/support/solutions/en/data/1-GNRWEH/index.html;jsessionid=a8108c3ea8d18c73bd38344fd59e I also have a demo that's a lot better at giving hands on code than that Mathworks solution, though the demo is for images rather than graphics. Let me know if you'd like to see it anyway - it might still be applicable.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Orange 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!