MATLAB: How to rotate the annotation text box

figureMATLABtext;

I want to rotate my annotation text box so I used both of this codes:
annotation(gcf,'textbox',...
[0.365880952380952 0.219841269841271 0.17102380952381 0.0444444444444446],...
'String','Gulf',...
'FitBoxToText','off','BackgroundColor','none','EdgeColor','none',...
'FontSize',8, 'color','w','FontName', 'cambria math','FontWeight','bold','TextRotation',45);
And:
h = annotation(gcf,'textbox',...
[0.365880952380952 0.219841269841271 0.17102380952381 0.0444444444444446],...
'String','Gulf',...
'FitBoxToText','off','BackgroundColor','none','EdgeColor','none',...
'FontSize',8, 'color','w','FontName', 'cambria math','FontWeight','bold');
set(h,'Rotation',45)
But both of this not working and causing errors. Did you know what is the problem here?
I read both of this questions (1 & 2) but they are didn't work too.
Thanks

Best Answer

You can use textarraw, with options to make the head and line invisible
a = annotation(gcf,'textarrow',...
[0.365880952380952 0.365880952380952], [0.219841269841271 0.219841269841271],...
'String','Gulf', 'HeadStyle', 'none', 'LineStyle', 'none',...
'FontSize',8, 'color','k','FontName', ...
'cambria math','FontWeight','bold', 'TextRotation',45);