hey, how can I move back the axis rulers? something like these

조회 수: 2 (최근 30일)
M. Levi
M. Levi 2022년 4월 21일
댓글: DGM 2023년 10월 6일

답변 (1개)

Sudarsanan A K
Sudarsanan A K 2023년 10월 6일
Hi M. Levi,
It is my understanding that you are trying to adjust the amount of tick length extension in a MATLAB plot. In this case you can use the 'TickLength' property of the axes. The property 'TickLength' is used for defining the tick mark length of the axes, specified as a two-element vector of the form [2Dlength 3Dlength] with a default value of [0.01 0.025]. The first element is the tick mark length in 2-D views and the second element is the tick mark length in 3-D views. Specify the values in units normalized relative to the longest of the visible x-axis, y-axis, or z-axis lines. Adjusting the tick mark length is illustrated in the following example.
% Generate sample data
Z = peaks(25);
% Create the 3D plot
figure
surf(Z);
xlabel('X');
ylabel('Y');
zlabel('Z');
ax = gca;
% Adjust the length of the axis rulers at the tick markings
ax.TickLength = [0.1, 0.1];
You can explore more on the axes properties in MATLAB from the link: https://mathworks.com/help/matlab/ref/matlab.graphics.axis.axes-properties.html#responsive_offcanvas
I hope this address your query.
  댓글 수: 1
DGM
DGM 2023년 10월 6일
That's not what the question asks to do. OP was asking how to move the rulers to the other edges of the plot box, not how to make tick marks longer.

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

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by