Set limit for colorbar in log 3D plot
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Alberto Mora
am 30 Mai 2017
Kommentiert: Alberto Mora
am 31 Mai 2017
Dear all, I am plotting a 3D graph using a Z logaritmic axis. The surface have got a vertical asynthos (Z axis). For this reason I use Zlim([minDesidValue maxDesidValue]) to limit the Z axis. Consequently I set caxis([minDesidValue maxDesidValue]). However, considering the Z axis is logaritmic, the colorbar "draw" my surface in linear method, and so with unsatisfying results (I suppose that is caused by the linear relation between coloration and colorbar limits). In atteached you can see the figure. Best regars. Alberto Mora
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/164642/image.png)
2 Kommentare
Akzeptierte Antwort
Walter Roberson
am 31 Mai 2017
If you are using R2014b or newer, then
cb = colorbar();
cb.Ruler.Scale = 'log';
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Colorbar finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!