爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 365|回复: 0

[程序设计] m_map工具箱画散点图,散点和图层不同步问题

[复制链接]

新浪微博达人勋

发表于 2023-12-22 10:03:32 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
clear
clc
data=load('C:\Users\HP\Desktop\canshu_data\wind.txt');
lat=data(:,2);
lon=data(:,3);
wind10=data(:,8);

red=find(wind10>18);
red_lon=lon(red);
red_lat=lat(red);
scatter(red_lon,red_lat,'.','r');
hold on
yellow=find(wind10<=18 & wind10>16);
yellow_lon=lon(yellow);
yellow_lat=lat(yellow);
scatter(yellow_lon,yellow_lat,'.','y')
hold on
green=find(wind10<=16 & wind10>14);
green_lon=lon(green);
green_lat=lat(green);
scatter(green_lon,green_lat,'.','g')
hold on
blue=find(wind10<=14);
blue_lon=lon(blue);
blue_lat=lat(blue);
scatter(blue_lon,blue_lat,'.','b')
hold on

title('10年一遇极端风速','Fontsize',15);
h=legend('>18','16-18','14-16','<=14','location','SouthWest')
set(h,'Fontsize',15);
hold on;
shengjie=shaperead('D:\shengjie.shp');
x=[shengjie.X];
y=[shengjie.Y];
m_proj('Equidistant Cylindrical','lon',[114,120],'lat',[29,35]);
set(gca,'fontsize',16,'linewidth',2)
hold on;

m_plot(red_lon,red_lat,'ro','MarkerFaceColor','r')
m_plot(blue_lon,blue_lat,'bo','MarkerFaceColor','b')
m_plot(green_lon,green_lat,'go','MarkerFaceColor','g')
m_plot(yellow_lon,yellow_lat,'yo','MarkerFaceColor','y')
m_plot(x,y,'k','linewidth',2.5)
m_grid


加图层前

加图层前

加图层后

加图层后
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表