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?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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.
Akzeptierte Antwort
MathWorks Support Team
am 27 Jun. 2009
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Contour Plots finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!