2D plot of a matrix using colors
Mostrar comentarios más antiguos
I would like to plot air pollutants emissiosn on the US map.
The datasets I am using are
- lat.mat (172*172)....latitude data
- lon.mat(172*172)...longitude data
- CH4.mat (172*172)...air pollutant emission data[mol/sec]
load 'latmat.mat';
load 'lonmat.mat';
load 'CH4.mat';
figure; ax=usamap(('NY','FL'));
setm(ax,'FFaceColor', [.5 .7 .9]);
title('Air pollution map');
%Read shapefile of US with names and locations
states=geoshape(shaperead('usastatehi.shp','UseGeoCoords',true));
%Display map
geoshow(states,'Parent',ax);
%Find states within the shown axes limits
latlim=getm(ax, 'MapLatLimit');
lonlim=getm(ax, 'MapLonLimit');
idx=ingeoquad(states.LabelLat, states.LabelLon,latlim,lonlim);
%Plot coordinates
txt=states(idx).Name;
linem(latmat,lonmat,'LineStyle','none','LineWidth',2,'Color','r','Marker','o', 'MakerSize',10);
This coding results in the figure below(Left). This is obviously 2-D data map.

However I would like to consider the values of air pollutant(z-factor).
The ideal image is like this.

Is there any way to model the dataset?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Create Plots on Maps en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
