How can I set zlabel log scale on 3d plot
조회 수: 8 (최근 30일)
이전 댓글 표시
set(gca,'xscale','log');
set(gca,'yscale','log');
set(gca,'zscale','log')
When I use the code, xlabel doesn't change with log scale.
I've used loglog, semilog but it doesn't work.
댓글 수: 1
VBBV
2024년 3월 6일
use the command
grid on
after plotting 3D function. Sometimes it is not visible clearly
I've used loglog, semilog but it doesn't work.
These are meant for 2D plots only
답변 (1개)
Chunru
2024년 3월 6일
[X,Y,Z] = peaks(50);
X = X - min(X(:)) + 1; % make it +ve for log
Y = Y - min(Y(:)) + 1;
Z = Z - min(Z(:)) + 1;
surf(X, Y, Z)
set(gca,'xscale','log');
set(gca,'yscale','log');
set(gca,'zscale','log')
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Log Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!