0001 function VMT_PlotDAVvectors(Easting,Northing,DAVeast,DAVnorth,ascale,QuiverSpacing,plot_metric)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 warning off
0012 disp('Plotting Plan View with Depth-Averaged Velocity Vectors...')
0013
0014
0015
0016 if exist('plot_metric')==0
0017 plot_metric = 1;
0018 disp('No units specified, plotting in metric units by default')
0019 end
0020
0021
0022
0023
0024 fig_planview_handle = findobj(0,'name','Plan View Map');
0025
0026 if ~isempty(fig_planview_handle) && ishandle(fig_planview_handle)
0027 figure(fig_planview_handle); clf
0028 else
0029 fig_planview_handle = figure('name','Plan View Map'); clf
0030
0031 end
0032
0033
0034
0035 toquiv(:,1) = Easting(1:QuiverSpacing:end);
0036 toquiv(:,2) = Northing(1:QuiverSpacing:end);
0037 toquiv(:,3) = DAVeast(1:QuiverSpacing:end);
0038 toquiv(:,4) = DAVnorth(1:QuiverSpacing:end);
0039 vr = sqrt(toquiv(:,3).^2+toquiv(:,4).^2);
0040
0041 figure(fig_planview_handle); hold on
0042
0043
0044 if ~plot_metric
0045
0046 quiverc(toquiv(:,1),toquiv(:,2),toquiv(:,3)*3.281,toquiv(:,4)*3.281,ascale);
0047 colorbar('FontSize',16,'XColor','w','YColor','w');
0048 if sum(~isnan(vr)) == 0
0049 errordlg('No Valid Data','Plotting Error');
0050 end
0051 disp(['DAV range (ft/s) = ' num2str(nanmin(vr)*3.281) ' to ' num2str(nanmax(vr)*3.281)])
0052 caxis([nanmin(vr*3.281) nanmax(vr*3.281)])
0053 title('Depth-Averaged Velocities (ft/s)','Color','w');
0054
0055 else
0056
0057 quiverc(toquiv(:,1),toquiv(:,2),toquiv(:,3),toquiv(:,4),ascale);
0058
0059
0060
0061
0062
0063 colorbar('FontSize',16,'XColor','w','YColor','w');
0064 if sum(~isnan(vr)) == 0
0065 errordlg('No Valid Data','Plotting Error');
0066 end
0067 disp(['DAV range (m/s) = ' num2str(nanmin(vr)) ' to ' num2str(nanmax(vr))])
0068 caxis([nanmin(vr) nanmax(vr)])
0069 title('Depth-Averaged Velocities (m/s)','Color','w');
0070 end
0071 xlabel('UTM Easting (m)')
0072 ylabel('UTM Northing (m)')
0073 box on
0074
0075
0076
0077
0078 BkgdColor = 'black';
0079 AxColor = 'white';
0080 FigColor = 'black';
0081 FntSize = 14;
0082 figure(fig_planview_handle)
0083
0084 set(gcf,'Color',BkgdColor);
0085 set(gca,'FontSize',FntSize)
0086 set(get(gca,'Title'),'FontSize',FntSize)
0087 set(gca,'Color',FigColor)
0088 set(gca,'XColor',AxColor)
0089 set(gca,'YColor',AxColor)
0090 set(gca,'ZColor',AxColor)
0091 set(findobj(gcf,'tag','Colorbar'),'FontSize',FntSize,'XColor',AxColor,'YColor',AxColor);
0092 set(get(gca,'Title'),'FontSize',FntSize,'Color',AxColor)
0093 set(get(gca,'xLabel'),'FontSize',FntSize,'Color',AxColor)
0094 set(get(gca,'yLabel'),'FontSize',FntSize,'Color',AxColor)
0095
0096
0097 ticks_format('%6.0f','%8.0f');
0098 hdlzm = zoom;
0099 set(hdlzm,'ActionPostCallback',@mypostcallback_zoom);
0100 set(hdlzm,'Enable','on');
0101 hdlpn = pan;
0102 set(hdlpn,'ActionPostCallback',@mypostcallback_pan);
0103 set(hdlpn,'Enable','on');
0104
0105 disp('Plotting Complete...')
0106
0107
0108
0109 function mypostcallback_zoom(obj,evd)
0110 ticks_format('%6.0f','%8.0f');
0111
0112 function mypostcallback_pan(obj,evd)
0113 ticks_format('%6.0f','%8.0f');
0114