function f_map(FN, mdat, mlat, mlon, Cr, ttl, xlb, ylb) %* render flat map data f_map(FN, mdat, mlat, mlon, Cr, ttl, xlb, ylb) % FN figure number % mdat map data to be rendered % mlat latitudes for mdat % mlon longitudes for mdat % Cr color axis [min max] array % ttl figure title, expects character string % xlb x-axis label, character string % ylb y-axis label, character string %* load a MATLAB native data set containing lat & lon of world coaslines load coast %* map plot window wind=[min(mlon) max(mlon) min(mlat) max(mlat)]; %******** % flat map using data passed to the function %******** figure(FN) %open figure window clf axis equal axis(wind) % define axes for this plot hold on caxis(Cr) % define color range for this plot pcolor(mlon, mlat, mdat) % simple Plate Carree projection shading flat xlabel(xlb) ylabel(ylb) title(ttl) colorbar('horiz') hold on plot(long, lat, 'r-') % plot world coastlines