plotannotation

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - User interface
Introduced first in SolidGeometry 3.6, Creation date: 2017-03-09, Last change: 2025-09-14

plots a annotation box (per default into the right upper corner) of a plot axis

Description

the annotation box is able to adjust the size but this function is related to the "left" "HorizontalAlignment". Therefor it is necessary to calculate a little to bring an automatical size adjusted box into the right corner of a subplot

See also: findobj(findall(groot),'Type','Textbox')


See Also: SGfigureannotation , SGhelptext , plotannotationdelete , plotannotationtopleft , titleofcaller , plotannotatecolors

Example Illustration

 missing image of plotannotation(str,position)

Syntax

t=plotannotation(str,[position])

Input Parameter

str: string or cell with separated strings
position: Vtop, Vmiddle, Vdown, Hright, Hmiddle, Hleft, left, right, center

Property names

'Vtop' :
'Vmiddle' :
'Vdown' :
'Hright' :
'Hmiddle' :
'Hleft' :
'left' :
'right' :
'center' : ?

Output Parameter

t: handle to annotation box

Examples


subplot(2,2,3);
t=plotannotation({'RED = ccw','GREEN = cw','long long text row'},'linestyle','none');
subplot(2,2,2);
t=plotannotation('Line 1\n Line 2\n\nLine 3','linestyle','none');
t=plotannotation('Line 1\n Line 2\n\nLine 3','linestyle','none','Vdown','Hmiddle','left'); shg




Copyright 2017-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Last html export of this page out of FM database by TL: 2025-09-21