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

1 view (last 30 days)

Answers (1)

Sudarsanan A K
Sudarsanan A K on 6 Oct 2023
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 Comment
DGM
DGM on 6 Oct 2023
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.

Sign in to comment.

Categories

Find more on Graphics Object Properties in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!