clear distinction between positive and negative values in plot
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Chiel van Wanrooij
am 10 Jan. 2023
Beantwortet: dpb
am 10 Jan. 2023
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1257975/image.png)
[K,H,Pmax,Pmin] = surfature(X1,Y1,Zplane);
figure(4)
D = mesh(X1,Y1,Zplane,K);
set(gca,'clim',[-1,1])
xlim([0 84.83])
ylim([0 63.60])
xlabel('x [\mum]')
ylabel('y [\mum]')
zlabel('z [\mum]')
colorbar
Hello,
It is really hard to see what are positive curvatures and what are negative curvatures. I would like to have for all the positive values one color (yellow), and for all negative values on color (blue). How can I specify that in my figure?
Thank you.
1 Kommentar
Akzeptierte Antwort
dpb
am 10 Jan. 2023
Try
mymap=[0 0 1;1 1 0];
mesh(peaks)
colormap(mymap)
If the mean of your surface isn't zero, you might want to plot sign(Zplane) instead.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Orange 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!