The 'extent' property of a text object returns an incorrect value in a log-scaled axis. Execute the following code to create a text object:
h = text(0.5,0.5,'Test Message');
Run the following code to get 'Extent' property, which gives a vector that defines the size and position of the text string:
extTxtLinear = get(h,'Extent')
Now set the axes to 'logscale' and get the 'Extent' property again:
set(gca,'yscale','log');extTxtLogY = get(h,'Extent')
The 'extent' property returns the wrong value in log-scaled axis.
Best Answer