PROVEC Generate progressive vector diagrams (simple and fancy). Simple provecs: PROVEC(DT,U,V) generates a simple progressive vector diagram plotting CUMSUM(U*DT) vs CUMSUM(V*DT). U and V are column vectors, or matrices with time oriented in columns. DT is a scalar with units of of hours, while U and V must have units of cm/s. PROVEC(DT,CV), where CV=U+iV, also works. INT=PROVEC(...) outputs the integrated dispacement INT in km. Fancy provecs: A fancy provec use SCATTER to plot the color and/or sizes of the points according to another parameter, say density or temperature. A colorbar is also plotted. PROVEC(DT,U,V,C) uses C, of size SIZE(U), as the symbol color. PROVEC(DT,U,V,C,S) also uses S, of size SIZE(U), as the symbol size. PROVEC(DT,CV,C) and PROVEC(DT,CV,C,S) also work. Note that since SCATTER is slow for large datasets, it is useful to decimate the data after CUMSUMing but before plotting. This is accomplished using PROVEC(...,INDEX). 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. As an example, load bravo94 th=100*detrend(bravo94.cat.th(:,3)); [int,h,hc]=provec(1,bravo94.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(dt,cv); [int,h,hc]=provec(dt,cv,c,index); [int,h,hc]=provec(dt,cv,c,s,index); _________________________________________________________________ This is part of JLAB --- type 'help jlab' for more information (C) 1999--2017 J.M. Lilly --- type 'help jlab_license' for details