Home > wafo > cycles > ccplot.m

ccplot

PURPOSE ^

Plots a cycle count as a point process in the plane.

SYNOPSIS ^

ccplot(cc,ps)

DESCRIPTION ^

 CCPLOT Plots a cycle count as a point process in the plane.
 
  CALL: ccplot(cc,psize)
 
    cc    = a two column matrix with cycles.
    psize = point size, (optional, default value is 12).
 
  See also  tp2mm, tp2rfc, tp2tc

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

001 function ccplotccplot(cc,ps)
002 %CCPLOT Plots a cycle count as a point process in the plane.
003 %
004 % CALL: ccplot(cc,psize)
005 %
006 %   cc    = a two column matrix with cycles.
007 %   psize = point size, (optional, default value is 12).
008 %
009 % See also  tp2mm, tp2rfc, tp2tc
010 
011 % Tested  on Matlab  5.3
012 %
013 % History:
014 % Revised by PJ 26-Jul-2000
015 %   Now works when cc is 4 column matrix.
016 % Revised by PJ (Pär Johannesson) 18-May-2000
017 %   When input cc is a cell-array, 
018 %   then each cell i plotted in a subplot. 
019 % Revised by PJ (Pär Johannesson) 01-Nov-1999
020 %   updated for WAFO
021 % Copied from WAT Ver. 1.2
022 
023 % Check input arguments
024 
025 ni = nargin;
026 no = nargout;
027 error(nargchk(1,2,ni));
028 
029 if ni<2
030   ps=12;
031 end
032 
033 % If F is a cell-array, then plot each cell in a subplot
034 if iscell(cc)
035   [N,M] = size(cc);
036   for i=1:N
037     for j=1:M
038       subplot(N,M,(i-1)*M+j)
039       ccplot(cc{i,j},ps);
040     end
041   end
042   
043 elseif ~isempty(cc)
044   
045   m=max(max(cc(:,1:2)));
046   n=min(min(cc(:,1:2)));
047   
048   border=max(abs(m),abs(n))*1.1;
049   
050   plot(cc(:,1),cc(:,2),'.','markersize',ps)
051   axis([-border, border, -border, border]); axis('square')
052   xlabel('min')
053   ylabel('max')
054   
055 end
056

Mathematical Statistics
Centre for Mathematical Sciences
Lund University with Lund Institute of Technology

Comments or corrections to the WAFO group


Generated on Thu 06-Oct-2005 02:21:16 for WAFO by m2html © 2003