I am using the code below that shows the same text as axis xlabel and as a text object. These two labels appear in different sizes despite both being defined at the same size (10 points). I tried on both Windows and Mac. Also in both 2017b and 2018a versions. same problem appears.
lbl = 'These two labels should have the same fontsize 10 yet appear with different sizes' ;figure(1);clfset(gcf,'position',[100 100 700 700]) plot([0 1],[0 1],'r')xlabel(lbl)text(0.5,-0.1, lbl, 'units','normalized', ... 'HorizontalAlignment','center','fontsize',10)set(gca,'fontsize',10)
Best Answer