change x/y/z axis values in surf(X,Y,Z) plot
이전 댓글 표시
Hello, I want to change the axis limits of a surf plot so that they correspond to actual values and not the dimension of the data matrix. Is it possible? I tried setting xlim (y and z as well) but the graph disappears. I use matlab R2017a. Thank you!
답변 (1개)
KALYAN ACHARJYA
2019년 6월 20일
편집: KALYAN ACHARJYA
2019년 6월 20일
[X,Y] = meshgrid(1:0.5:10,1:20);
Z = sin(X) + cos(Y);
surf(X,Y,Z)
xlim([0 21]);
ylim([1 10]);
zlim([0 50]);
Chosse the x,y,z range in such a way that plotin the range (within space), otherwise plot may be disappears.
카테고리
도움말 센터 및 File Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!