% PLOTPOINT % % Function to plot 2D points with an optionally specified % marker and optional labelling text. % % Usage: % plotPoint(p) where p is a 2D point % plotPoint(p, 'mark') where mark is say 'r+' or 'g*' etc % plotPoint(p, 'mark', 'text') % % Peter Kovesi April 2000 % Department of Computer Science % The University of Western Australia function plotPoint(p, mark, txt) hold on mrk = 'r+'; % Default mark is a red + if nargin >= 2 mk = mark; end plot(p(1), p(2), mk); if nargin == 3 text(p(1)+5,p(2)-5,txt,'Color',mk(1)); % offset text 5 pixels to the right and up end