MATLAB: Does “Generate MATLAB file” not take into consideration the modified position of LABELS and TITLE in MATLAB 7.7 (R2008b)

locationm-fileMATLABx-labelxlabely-labelylabel

I am trying to generate MATLAB code from the modified figure in MATLAB 7.7 (R2008b).
Reproduction steps:
1. Execute the following command at MATLAB prompt:
plot(1:10);
title('title');
2. Open the plot-tools and change the position of 'title'.
3. Go to File -> Generate MATLAB file. This should generate an untitled MATLAB file in the MATLAB Editor. If you notice, the code does not take into consideration the modified position of the 'title'.
4. Try saving the file and run the file with input as "1:10". This will plot 1:10 with 'title' located at the original position of TITLE rather than at the modified position.

Best Answer

This is an expected behavior in MATLAB 7.7 (R2008b). LABELS and TITLE are standard graphics objects which are supposed to be located at some specific position to justify their meaning and significance. Repositioning these objects defeats the purpose of their existence. If you would like to have modified position of LABELS or TITLE, you should instead use TEXT objects. For more information on text objects please refer to:
<http://www.mathworks.com/access/helpdesk/help/techdoc/ref/text.html>
Or if you have MATLAB installed, execute the following at MATLAB command prompt:
web([docroot '/techdoc/ref/text.html'])