Conflict in surf command between zscale and zlim?

Hi all,
I'd like to plot several 3D surfaces with semilog scale on z-axis, but also set the z-axis limit to be the same, so I do:
set(gca, 'ZScale', 'log')
axi_lim = [0, err0];
zlim(axi_lim)
The z-axis is semilog as I want, but the axis limit is different, like this
How can I make all the z-axis exactly the same? Many thanks!

답변 (1개)

Star Strider
Star Strider 2017년 2월 23일

0 개 추천

See if this addition does what you want:
set(gca, 'ZScale', 'log')
axi_lim = [0, err0];
zlim(axi_lim)
axis tight % <— ADD THIS LINE HERE

댓글 수: 2

Xh Du
Xh Du 2017년 2월 23일
Hi,
I added this command into the script, it seems not working.
Z-axis is still different.
I don’t have the rest of your code to experiment with.
See if this syntax change works:
axi_lim = [0, err0];
set(gca, 'ZScale', 'log', 'ZLim',axi_lim)
axis tight
This can work when a direct call to the zlim function fails.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터 및 File Exchange에서 Vector Fields에 대해 자세히 알아보기

질문:

2017년 2월 23일

댓글:

2017년 2월 23일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by