如何配置颜色映射和颜色条以显示来自contourf的z值的灰度。
cla(handles.axes1);
axes(handles.axes1);
contourf(xC(1,:),yC(:,1),zC,linspace(postTest1.minZ, postTest1.maxZ, 50),'-k');
colormap('Jet');
colorbar('location','eastoutside')发布于 2012-02-23 04:51:00
如果我正确理解了您的问题,您希望在colorbar上显示与contourf图相同数量的颜色级别。要做到这一点,只需将颜色映射限制为相同数量的颜色即可:
colormap(jet(50));https://stackoverflow.com/questions/9400537
复制相似问题