How to reduce space between axis labels and axis ticks?
130 views (last 30 days)
Kevin Holly on 26 Sep 2021
Get the axes handle by using the command below
axes_handle = gca; %gca stands for get current axes
Now I am looking up the current position of the xlabel.
The position in the x, y, and z-direction are 0.5, -0.0705, and 0, respectively.
Now, change the second value in the array. This will change the vertical position.
axes_handle.XLabel.Position = [27.5 -1.10 -1];
Now, let's change the first value in the position array to move the ylabel horizontally.
axes_handle.YLabel.Position = [-2.6 0 -1];