Why do colorbar limits not match the values specified by the CAXIS function in MATLAB 7.0 (R14) when using the CONTOUR or CONTOURF function?
8 次查看(过去 30 天)
显示 更早的评论
When I execute the following commands, the color bar limits do not match those of my contour plot:
contourf(peaks) % contour(peaks)
caxis([-2 2])
colorbar
I expected the color bar limits to range from -2 to 2, however, the limits range from -6 to 8.
采纳的回答
MathWorks Support Team
2009-6-27
This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
A bug in MATLAB 7.0 (R14) causes color axis limits on a graph created using the CONTOUR or CONTOURF functions to be set incorrectly.
To work around this issue, use the CONTOUR/CONTOURF function with the 'v6' switch. For example,
contourf('v6',peaks) % contour('v6',peaks)
caxis([-2 2])
colorbar
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Contour Plots 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!