From: Li on
I plotted a US map using 'plot(lon, lat, 'k-'). Now I want to add the state boundaries. Unfortunately, the only state boundary date I could find are in the form of *.shp. Is there a way I can directly plot *.shp data into a x-y plotted map?

Thanks.
From: Rob Comer on
> I plotted a US map using 'plot(lon, lat, 'k-'). Now I want to add the state boundaries. Unfortunately, the only state boundary date I could find are in the form of *.shp. Is there a way I can directly plot *.shp data into a x-y plotted map?

You can see some examples here:

http://www.mathworks.com/products/mapping/demos.html?file=/products/demos/shipping/map/mapexmap.html

Rob Comer
Mapping Toolbox Development
MathWorks
From: Li on
Thank you, Rob.

That is great. I also found another way to do it:

S1 = shaperead('usastatelo.shp');
plot([S1.X],[S1.Y], 'k:');


"Rob Comer" <rob.comer.nospam(a)mathworks.com> wrote in message <hvu4t2$amh$1(a)fred.mathworks.com>...
> > I plotted a US map using 'plot(lon, lat, 'k-'). Now I want to add the state boundaries. Unfortunately, the only state boundary date I could find are in the form of *.shp. Is there a way I can directly plot *.shp data into a x-y plotted map?
>
> You can see some examples here:
>
> http://www.mathworks.com/products/mapping/demos.html?file=/products/demos/shipping/map/mapexmap.html
>
> Rob Comer
> Mapping Toolbox Development
> MathWorks
 | 
Pages: 1
Prev: mexCallMATLAB
Next: Plotting Borehole data.