Home > timeplt > demotplt.m

demotplt

PURPOSE ^

DEMOTPLT demonstrates the use of TIMEPLT and STACKLBL.

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 DEMOTPLT demonstrates the use of TIMEPLT and STACKLBL.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % DEMOTPLT demonstrates the use of TIMEPLT and STACKLBL.
0002 %
0003 
0004 % Call TIMEPLT specifying east and north velocity components
0005 % in the bottom panel, vector magnitude in the middle panel and a vector
0006 % stick plot in the top panel.  Note: each stick plot must have it's own panel
0007 
0008 
0009 %
0010 % Demonstrate for each time catagory.
0011 
0012 figure;
0013 
0014 % years
0015   start=[1970 11 1 0 0 0];    %Gregorian start [yyyy mm dd hh mi sc]
0016   stop=[1996 2 1 0 0 0];
0017   jd=julian(start):100:julian(stop);
0018 
0019 % synthesize velocity data
0020   u=sin(.1*jd(:)/100).^2-.5;
0021   v=cos(.1*jd(:)/100);
0022 
0023 % convention: store velocity time series as complex vector:
0024   w=u+i*v;
0025 
0026   h=timeplt(jd,[u v abs(w) w],[1 1 2 3]);
0027   title('Demo of TIMEPLT and STACKLBL:  Years')
0028  
0029 % use STACKLBL to label each stack plot panel with title and units:
0030 
0031   stacklbl(h(1),'East + North velocity','m/s');
0032   stacklbl(h(2),'Speed','m/s');
0033   stacklbl(h(3),'Velocity Sticks','m/s');
0034 
0035 
0036 disp('hit enter to continue')
0037 pause
0038 
0039 % months
0040 
0041 figure
0042 
0043   start=[1990 1 1 0 0 0];    %Gregorian start [yyyy mm dd hh mi sc]
0044   stop=[1991 4 1 0 0 0];
0045   jd=julian(start):10:julian(stop);
0046 
0047 % synthesize velocity data
0048   u=sin(.1*jd(:)/10).^2-.5;
0049   v=cos(.1*jd(:)/10);
0050 
0051 % convention: store velocity time series as complex vector:
0052   w=u+i*v;
0053 
0054   h=timeplt(jd,[u v abs(w) w],[1 1 2 3]);
0055   title('Demo of TIMEPLT and STACKLBL:  Months')
0056  
0057 % use STACKLBL to label each stack plot panel with title and units:
0058 
0059   stacklbl(h(1),'East + North velocity','m/s');
0060   stacklbl(h(2),'Speed','m/s');
0061   stacklbl(h(3),'Velocity Sticks','m/s');
0062 
0063 
0064 disp('hit enter to continue')
0065 pause
0066 
0067 figure
0068 
0069 % days
0070   start=[1990 1 1 0 0 0];    %Gregorian start [yyyy mm dd hh mi sc]
0071   stop=[1990 1 15 0 0 0];
0072   jd=[julian(start):1/6:julian(stop)];
0073 
0074 % synthesize velocity data
0075   u=sin(.1*jd(:)*10).^2-.5;
0076   v=cos(.1*jd(:)*10);
0077 
0078 % convention: store velocity time series as complex vector:
0079   w=u+i*v;
0080 
0081   h=timeplt(jd,[u v abs(w) w],[1 1 2 3]);
0082   title('Demo of TIMEPLT and STACKLBL:  Days')
0083  
0084 % use STACKLBL to label each stack plot panel with title and units:
0085 
0086   stacklbl(h(1),'East + North velocity','m/s');
0087   stacklbl(h(2),'Speed','m/s');
0088   stacklbl(h(3),'Velocity Sticks','m/s');
0089 
0090 
0091 
0092 disp('hit enter to continue')
0093 pause
0094 
0095 figure
0096 
0097 % hours
0098   start=[1990 1 1 0 0 0];    %Gregorian start [yyyy mm dd hh mi sc]
0099   stop=[1990 1 1 15 0 0];
0100   jd=[julian(start):1/100:julian(stop)];
0101 
0102 % synthesize velocity data
0103   u=sin(.1*jd(:)*100).^2-.5;
0104   v=cos(.1*jd(:)*100);
0105 
0106 % convention: store velocity time series as complex vector:
0107   w=u+i*v;
0108 
0109   h=timeplt(jd,[u v abs(w) w],[1 1 2 3]);
0110   title('Demo of TIMEPLT and STACKLBL:  Hours')
0111  
0112 % use STACKLBL to label each stack plot panel with title and units:
0113 
0114   stacklbl(h(1),'East + North velocity','m/s');
0115   stacklbl(h(2),'Speed','m/s');
0116   stacklbl(h(3),'Velocity Sticks','m/s');
0117 
0118 
0119 
0120 
0121 disp('hit enter to continue')
0122 pause
0123 
0124 figure
0125 
0126 % minutes
0127   start=[1990 1 1 5 0 0];    %Gregorian start [yyyy mm dd hh mi sc]
0128   stop=[1990 1 1 5 20 0];
0129   jd=[julian(start):1/5000:julian(stop)];
0130 
0131 % synthesize velocity data
0132   u=sin(.1*jd(:)*500).^2-.5;
0133   v=cos(.1*jd(:)*500);
0134 
0135 % convention: store velocity time series as complex vector:
0136   w=u+i*v;
0137 
0138   h=timeplt(jd,[u v abs(w) w],[1 1 2 3]);
0139   title('Demo of TIMEPLT and STACKLBL:  Minutes')
0140  
0141 % use STACKLBL to label each stack plot panel with title and units:
0142 
0143   stacklbl(h(1),'East + North velocity','m/s');
0144   stacklbl(h(2),'Speed','m/s');
0145   stacklbl(h(3),'Velocity Sticks','m/s');

Generated on Wed 30-Nov-2005 15:41:21 by m2html © 2003