PROVEC Generate progressive vector diagrams (simple and fancy). Simple provecs: PROVEC(U,V,DELTAT) generates a simple progressive vector diagram plotting cumsum(U*DELTAT) vs cumsum(V*DELTAT). U and V are column vectors, or matrices with time oriented in columns. DELTAT (optional) must be in units of seconds and defaults to one hour (3600 s). U and V must have units of cm/s. PROVEC(CV,DELTAT), where CV=U+iV, also works. INT=PROVEC(...) outputs the integrated dispacement INT in km. Fancy provecs: A fancy provec use SCATTER to plot change the color and/or sizes of the points according to another parameter, say density. A colorbar is also plotted. PROVEC(U,V,C,DELTAT) uses C as the symbol color. The array C must have the same size as U and V. PROVEC(U,V,C,S,DELTAT) also uses S as the symbol size. The array S must have the same size as U and V. PROVEC(CV,C,DELTAT) and PROVEC(CV,C,S,DELTAT) also work. Note that since SCATTER is slow for large datasets, it is useful to decimate the data before plotting. This is accomplished using PROVEC(...,INDEX,[DELTAT]), where INDEX is placed just before the optional DELTAT. Then only the points INT(INDEX,:) of the integrated trajectory are plotted. [INT,H,HC]=PROVEC returns the intergrated displacement INT, the handle H to the data, and the handle HC to the colorbar axis. PROVEC(DCOL,...), where DCOL is a scalar or a row vector, specifies that the columns of the data are to by offset by amount DCOL after plotting, for both simple and fancy provecs. If DCOL is a scalar, then successive columns after the first are offset by amount -DCOL. If DCOL is a row vector, then it specifies the offset for each column of the data. As an example, load bravo94 th=100*detrend(bravo.cat.th(:,3)); [int,h,hc]=provec(bravo.rcm.cv(:,3),th,20+0*th,[1:10:4000]); caxis([-8 8]) makes part of Figure 6b of Lilly and Rhines (2002) JPO. Usage: int=provec(cv); [int,h,hc]=provec(cv,c,index); [int,h,hc]=provec(cv,c,s,index); [int,h,hc]=provec(cv,c,s,index,deltat); [int,h,hc]=provec(dcol,cv,c,s,index,deltat); _________________________________________________________________ This is part of JLAB --- type 'help jlab' for more information (C) 1999--2012 J.M. Lilly --- type 'help jlab_license' for details