Saving a shape does not save its title

I will manually edit the title position of some chart as

 plot(X,Y);
 t=title('Data');
 set(t,'Position',get(t,'Position')-[0 1 0.4]);

But when I save the drawing, the title position returns to the default position. I am using Matlab R2014a.

How to keep title position?

+4
source share
1 answer

Yes, even in earlier versions of Matlab, it seems that the axis header is reset every time a picture is loaded.

To overcome this, use instead annotation. ( 'textbox').

For instance:

title_handle = annotation('textbox', [.2 .4 .1 .1], 'String', 'Data','LineStyle','none');

(*) , figure ( axes), , , , .

(*) normalized. ,

+3

All Articles