MATLAB地图作为底图,matlab画图——地图背景

  • Post author:
  • Post category:其他


使用Matlab加载shp地图

世界shp地图下载

画地图

要先下载m_map插件

再下载shp地图包

如部分加拿大气温检测站点图:

332e4bb83780901cd5f09f2063876108.png

%由经纬度坐标绘制点图

clc

clear all

close all

%读取excel数据

hold on

%绘制背景地图

infoL=shapeinfo(‘C:\Users\Administrator\Desktop\pro\mapshp\gadm36_CAN_0.shp’);

Canada=shaperead(‘C:\Users\Administrator\Desktop\pro\mapshp\gadm36_CAN_0.shp’);

gadm36_CAN_0x=[Canada(:).X];

gadm36_CAN_0y=[Canada(:).Y];

m_proj(‘lambert’,’lon’,[-141 -52],’lat’,[41 83]);

m_plot(gadm36_CAN_0x,gadm36_CAN_0y,’k’);

%m_grid;

m_coast(‘color’,’k’,’linewidth’,1);

latitude =xlsread(‘C:\Users\Admi