Put axis label in their respective middle (3D plot)

조회 수: 2(최근 30일)
Francesco Porretta
Francesco Porretta 2021년 9월 30일
편집: dpb 2021년 9월 30일
I'm trying to put the axis label in a 3D plot in the middle of the axis, without rotate them.
As example, consider this figure
obtained using this code:
s = 0:0.025:3;
t = s;
[x,y] = meshgrid(s,t);
z = x.^2 - y.^2;
What I want to obtained is something as shown in figure below (look x and y labels).
Is it possible??

채택된 답변

dpb 2021년 9월 30일
편집: dpb 2021년 9월 30일
hXL=xlabel('time[sec]'); % default label, save handle
hXL.Position=hXL.Position+[0.5 0 0]; % adjust default position
comes reasonably close -- salt to suit and follow the same idea for y.

추가 답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by