Mercurial > repos > public > sbplib
annotate +draw/labelPoint.m @ 103:bc5db54f9efd feature/arclen-param
fzero_vec, integral_vec and spline are now local functions in Curve. Renamed arcLengthStretch to arcLengthParametrization. Removed plot_derivative. Added some comments and extra lines + removed unneccesary lines. arcLength is now a method and not static. Constructor does not accept difference operator anymore.
author | Martin Almquist <martin.almquist@it.uu.se> |
---|---|
date | Mon, 07 Dec 2015 17:24:28 +0100 |
parents | 48b6fb693025 |
children |
rev | line source |
---|---|
0 | 1 % Takes a variable number of points as inputs and plots them with a label to the current figure. |
2 % label_pt(p) | |
3 function label_pt(varargin) | |
4 for i = 1:length(varargin) | |
5 try | |
6 placelabel(varargin{i},inputname(i)); | |
7 catch e | |
8 error('Could not place label for input %d, ''%s''. Not a valid point',i,inputname(i)) | |
9 end | |
10 end | |
11 end | |
12 | |
13 function placelabel(pt,str) | |
14 x = pt(1); | |
15 y = pt(2); | |
16 h = line(x,y); | |
17 h.Marker = '.'; | |
18 h = text(x,y,str); | |
19 h.HorizontalAlignment = 'center'; | |
20 h.VerticalAlignment = 'bottom'; | |
21 end |