% DiagPlotMakePlot is called by DiagPlot and cannot be used seperately. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Make plot % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% if isequal(cmp,'Dif') plotdata = data{inrow}{1} - data{inrow}{2}; else plotdata = data{inrow}{incol}; end % Make gridded plot. This should be fixed up to allow for non-constant % height intervals, imagesc makes everything equally spaced in the vertical % (and in the horizontal for that matter). if isequal(pst,'Grd') if isCS merccube_mod(xax{inrow}{incol},yax{inrow}{incol},plotdata); else imagesc(xax{inrow}{incol},yax{inrow}{incol},plotdata); end % Make interpolated plot. elseif isequal(pst,'Int') if isCS merccube_mod(xax{inrow}{incol},yax{inrow}{incol},plotdata); shading interp; else pcolor(xax{inrow}{incol},yax{inrow}{incol},plotdata); shading interp; end % Make contour (non-filled) plot. Let MATLAB determine the contour % intervals on a differencing plot. elseif isequal(pst,'Con') try [cs,h] = contour(xax{inrow}{incol},yax{inrow}{incol},plotdata,contint); catch [cs,h] = contour(xax{inrow}{incol},yax{inrow}{incol},plotdata); end set(h,'linewidth',linewidth); if UseConLabel clabel(cs,h,'fontsize',fs_clabel,'rotation',0); end % Make contour (filled) plot. Let MATLAB determine the contour % intervals on a differencing plot. elseif isequal(pst,'Cnf') try [cs,h] = contourf(xax{inrow}{incol},yax{inrow}{incol},plotdata,contint); catch [cs,h] = contourf(xax{inrow}{incol},yax{inrow}{incol},plotdata); end if UseCnfLabel clabel(cs,h,'fontsize',fs_clabel,'rotation',0); end % Make line plot. If this is an overlaying comparison, cycle through the % appropriate data of which to overlay. elseif isequal(pst,'Lin') if ismember(cmp,{'OvC','OvE','OvF'}) for intrl = 1:ntrl plot(xax{inrow}{intrl},data{inrow}{intrl},linecolors{intrl},'linewidth',linewidth); end else plot(xax{inrow}{incol},plotdata,linecolors{1},'linewidth',linewidth); end % Unknown plot style encountered. else error(['Oh dear! Undefined PlotStyle: ',pst]); end