Wednesday, March 26, 2014

Matlab Plot numbers on map

Wanted to plot a map with the numbers. I am adding +1 to the value if any zero observations were made to that station. It would be nice to show columns instead of the circles.

% plot the station numbers on the map

load NYstation_data.mat

close all
latlim = [40, 45];
lonlim = [-80,-73];

figure

ax = worldmap(latlim, lonlim);
states = shaperead('usastatehi','UseGeoCoords', true, 'BoundingBox', [lonlim', latlim']);
geoshow(ax, states, 'Facecolor', [1 1 0.9]);

for jj = 1:41
    jj
    
    %      textm(st_lat(jj),st_lon(jj), num2str(jj));
    
    plotm(st_lat(jj),st_lon(jj), jj,'o', 'MarkerEdgeColor','k','MarkerSize',dataavailable(jj)+1);
    
    hold on
    textm(st_lat(jj),st_lon(jj),  sprintf('%.1d', jj))
    
end

No comments: