Why does the xlabel command add the label outside of the figure box and changing the 'OuterPosition' and 'InnerPosition' properties does't work?
The following will reproduce the issue:
Starting with a figure containing an x-y plot, add a second set of axes using
ax1=gca;ax1_pos = ax1.Position; % position of first axes
ax2 = axes('Position',ax1_pos,... 'XAxisLocation','top',... 'Color','none');
change the second x-axis limits, then add a label
xlim([0.1 1.1]);xlabel('Outer diameter, in');
See that the label is outside of the figure box. Also, changing 'OuterPosition' and 'InnerPosition' properties does't do anything
Best Answer