문제

Is than an equivalent property to XTick for a 3D plot? Also, is there a way to determine the number output format for the axis tick marks?

도움이 되었습니까?

해결책

XTick is a property of axes, not plot. Whenever you use plot3, you draw on axes. Thus, it is relevant.

Instead of using XTick, you can use XTickLabel. It is a cell array of strings, so you can format them beforehand, by using sprintf.

x = 1:0.1:10;
y = x.^2;
z = sin(x);
figure;plot3(x,y,z);
set(gca,'XTickLabel',{'1' sprintf('%2.2f',pi) '3','4','5','John Doe'});
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top