[37] | 1 | function h=plotpoint(V,varargin) |
---|
| 2 | % PLOTPOINT Plot 2 or 3 dimensional points |
---|
| 3 | % PLOTPOINT(V) plots the 2 or 3 dimensional points V. V is a 2xK or |
---|
| 4 | % 3xK array, with one point per column. |
---|
| 5 | % |
---|
| 6 | % H=PLOTPOINT(...) returns the handle H of the plot. |
---|
| 7 | % |
---|
| 8 | % PLOTPOINT() is a simple wrapper around the PLOT() and PLOT3() |
---|
| 9 | % functions. By default, PLOTPOINT(V) plots the points with line |
---|
| 10 | % style '.'. PLOTPOINT(V,...) does not use the default line style; |
---|
| 11 | % rather it passess any extra argument to the underlying plot |
---|
| 12 | % function. |
---|
| 13 | % |
---|
| 14 | % See also PLOT(), PLOT3(). |
---|
| 15 | |
---|
| 16 | % AUTORIGHTS |
---|
| 17 | % Copyright (C) 2006 Andrea Vedaldi |
---|
| 18 | % |
---|
| 19 | % This file is part of VLUtil. |
---|
| 20 | % |
---|
| 21 | % VLUtil is free software; you can redistribute it and/or modify |
---|
| 22 | % it under the terms of the GNU General Public License as published by |
---|
| 23 | % the Free Software Foundation; either version 2, or (at your option) |
---|
| 24 | % any later version. |
---|
| 25 | % |
---|
| 26 | % This program is distributed in the hope that it will be useful, |
---|
| 27 | % but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 28 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 29 | % GNU General Public License for more details. |
---|
| 30 | % |
---|
| 31 | % You should have received a copy of the GNU General Public License |
---|
| 32 | % along with this program; if not, write to the Free Software Foundation, |
---|
| 33 | % Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|
| 34 | |
---|
| 35 | if length(varargin) == 0 |
---|
| 36 | varargin = {'.'}; |
---|
| 37 | end |
---|
| 38 | |
---|
| 39 | switch size(V,1) |
---|
| 40 | case 2 |
---|
| 41 | h=plot(V(1,:),V(2,:),varargin{:}) ; |
---|
| 42 | case 3 |
---|
| 43 | h=plot3(V(1,:),V(2,:),V(3,:),varargin{:}) ; |
---|
| 44 | otherwise |
---|
| 45 | error(['V must be either 2xK or 3xK.']) ; |
---|
| 46 | end |
---|