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

2 次查看(过去 30 天)

回答(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