Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear
- clc
- %// Create/plot data
- x = -10:10;
- y1 = x.^2;
- y2 = 2*x-10;
- plot(x,y1,'--r',x,y2,'-*k')
- %// Add some text
- t1 = text(-6,10,'Curve 1');
- t2 = text(6,-4,'Curve 2');
- %// Find text objects. Of course normally you would not know beforehand
- %their position
- hText = findobj('Type','Text');
- %// Get their position
- Text1Pos = get(hText(1),'Position')
- Text2Pos = get(hText(2),'Position')
- Text1Pos =
- 6 -4 0
- Text2Pos =
- -6 10 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement