经纬度下温度变化

clc;clear;
data1=xlsread('1998tmp.xlsx');
aa1=xlsread('AAA1.xlsx');
aa2=xlsread('AAA2.xlsx');
aa3=xlsread('AAA3.xlsx');
aa4=xlsread('AAA4.xlsx');
aa5=xlsread('AAA5.xlsx');
aa6=xlsread('AAA6.xlsx');
aa9=xlsread('AAA9.xlsx');
A1=data1(:,1);a1=A1(2:end);
B1=data1(1,:);B1=B1';b1=B1(2:end);
 
figure('numbertitle','off','name','contour3');
A=[aa1,aa2,aa3,aa4,aa5,aa6,aa9];
for i=1:1:7;
    clf;
    a=A(:,[(i-1)*41+1:i*41]);
    contour3(b1,a1,a,50, 'LineWidth',1.2);hold on
colormap('jet');view(0,90);colorbar;
str=get(gca,'xticklabel'); %获得句柄值
strtxt=strcat(str,'°N'); %字符串上加上°N’
set(gca,'xticklabel',strtxt); %重新设定横坐标%
str=get(gca,'yticklabel'); %获得句柄值
strtxt=strcat(str,'°E'); %字符串上加上°E’
set(gca,'yticklabel',strtxt); %重新设定横坐标%
% 坐标轴美化
axis equal;set(gca, 'Box', 'off', 'LineWidth', 1,...
        'XGrid', 'off', 'YGrid', 'off', ... 
        'TickDir', 'in', 'TickLength', [.015 .015], ... 
        'XMinorTick', 'on', 'YMinorTick', 'on', ...    
        'XColor', [.1 .1 .1],  'YColor',[.1 .1 .1]);
    hold on;set(gca,'XAxisLocation','top')
    XL = get(gca,'xlim'); XR = XL(2);
    YL = get(gca,'ylim');YT = YL(2);
    xc = get(gca,'XColor');yc = get(gca,'YColor');
    plot(XL,20*ones(size(XL)),'color',xc,'LineWidth',1);
    plot(XR*ones(size(YL)),YL,'color',yc,'LineWidth',1);
    set(gca, 'FontSize', 10);set(gcf,'Color',[1 1 1]);
    box on;grid on;
    pause(0.1);%加坐标边框%加网格线%可以在这里添加输出动图的程序
    print(['Frame ' num2str(i)], '-dpng', '-r150');
    drawnow;%实时更新坐标图窗口
end
    colormap('jet');
    GifName = '温度图.gif';
delay = 0.5;    % Delay between frames (s)
for ii = 1:1:7;
    [A, ~] = imread(['Frame ' num2str(ii) '.png']);
    [X, map] = rgb2ind(A, 256);
    if ii == 1
        imwrite(X, map, GifName, 'gif', 'LoopCount', inf, 'DelayTime', delay)
    else
        imwrite(X, map, GifName, 'gif', 'WriteMode', 'append', 'DelayTime', delay)
    end
end

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值