我想从包含三列的文本文件中制作颜色图(第一是纬度,第二是经度,第三是温度)。我已访问此代码,该代码从文本文件(1-1000.text)读取和创建颜色图
fid = fopen('1-1000.txt');
C = textscan(fid, '%f %f %f')
fclose(fid);
f = {'lat', 'long', 'temp'}
S = cell2struct(C,f,2);
N = 1000;
[Xi, Yi] = meshgrid(linspace(60,80,N),linspace(20,40,N));
Ci = griddata(S.long, S.lat, S.temp, Xi, Yi);
colormap ('hot')
imagesc(linspace(60,80,N),linspace(20,40,N),Ci);
xlabel('Longitude');
ylabel('Latitude');
colorbar
我有巴基斯坦的 shapefile(我的数据是巴基斯坦的),我想在巴基斯坦显示这个颜色地图的变化。但是不知道如何设置颜色图的背景。对于我所需要的地图的这篇帖子输出,我附上了摇晃。请帮助解决我的问题,并提前感谢 M.Usman Saleem 的这种帮助
这个数据
Lat long temp
27.5 62.5 0
27.5 63.5 0
27.5 64.5 0
28.5 60.5 0
28.5 61.5 0
28.5 62.5 0
28.5 63.5 0
28.5 64.5 0
28.5 65.5 0
29.5 60.5 0
29.5 62.5 0
29.5 63.5 0
29.5 64.5 0
29.5 65.5 0
29.5 68.5 0
29.5 69.5 0
30.5 60.5 0
30.5 62.5 0
30.5 63.5 0
30.5 64.5 0
30.5 65.5 0
30.5 66.5 0
31.5 60.5 0
31.5 63.5 0
31.5 64.5 0
33.5 60.5 0
35.5 74.5 0
35.5 75.5 0
36.5 71.5 0
37.5 72.5 0
37.5 75.5 0
37.5 77.5 0
37.5 78.5 0
38.5 76.5 0
25.5 77.5 228.5
27.5 66.5 106.8
23.5 76.5 192.7
24.5 77.5 188.3
27.5 71.5 26
35.5 61.5 262.4
32.5 60.5 83.6
37.5 60.5 10.7
36.5 61.5 9
36.5 66.5 45.8
36.5 68.5 43.9
24.5 60.5 178.3
23.5 64.5 187.8
31.5 62.5 47.1
26.5 63.5 250.9
22.5 64.5 209.4
23.5 61.5 181.9
23.5 65.5 185
23.5 62.5 172.5
22.5 62.5 179.9
22.5 63.5 184.2
24.5 62.5 173.3
24.5 63.5 178
23.5 63.5 180.4
22.5 65.5 192.8
24.5 64.5 177.2
24.5 65.5 162.7
22.5 61.5 175.9
22.5 66.5 207.61
24.5 61.5 183.6
23.5 66.5 163.2
23.5 60.5 180.4
23.5 67.5 200.4
22.5 67.5 194.6
22.5 60.5 166.2
24.5 66.5 182
25.5 60.5 179.8
23.5 68.5 205.8
22.5 68.5 198.1
37.5 69.5 417
25.5 66.5 43.9
31.5 61.5 159.7
24.5 68.5 11.9
38.5 62.5 74.6
38.5 60.5 63.5
38.5 61.5 114
37.5 61.5 113.4
38.5 64.5 110.7
38.5 63.5 92.8
37.5 63.5 136.1
37.5 64.5 118
37.5 62.5 98.6
38.5 65.5 77.8
37.5 65.5 93.5
37.5 67.5 74.1
37.5 68.5 87.9
36.5 65.5 168.8
37.5 66.5 168.1
36.5 67.5 174.5
38.5 66.5 229.8
25.5 75.5 21.5
28.5 74.5 267.6
28.5 72.5 287.5
28.5 73.5 278
35.5 63.5 281.8
30.5 71.5 2.1
28.5 71.5 307.4
29.5 73.5 237.6
34.5 62.5 202.9
31.5 71.5 202
32.5 71.5 139.6
31.5 73.5 117.6
28.5 68.5 238.9
30.5 72.5 167.3
31.5 72.5 133.1
29.5 72.5 220.8
32.5 73.5 103.7
33.5 72.5 68
28.5 75.5 389.1
35.5 60.5 201.6
29.5 74.5 230.3
28.5 69.5 199.5
32.5 74.5 109.4
31.5 74.5 93.7
38.5 77.5 227.5
27.5 72.5 23.6
29.5 71.5 223.5
30.5 73.5 171.8
34.5 60.5 31.3
29.5 75.5 197.6
30.5 75.5 121.7
27.5 68.5 255.7
33.5 71.5 94.4
28.5 70.5 252.7
30.5 74.5 119
26.5 70.5 537
27.5 70.5 184.5
23.5 70.5 519.5
29.5 70.5 212.6
38.5 78.5 75.3
23.5 69.5 464.5
28.5 76.5 228.5
34.5 61.5 56.5
26.5 69.5 419.2
27.5 77.5 210.9
31.5 70.5 154
25.5 68.5 322.4
27.5 78.5 180.2
31.5 75.5 111.2
23.5 71.5 487.1
26.5 71.5 405
24.5 71.5 442.2
34.5 71.5 101.4
28.5 78.5 153
24.5 70.5 306.6
28.5 77.5 145.9
25.5 71.5 460.1
25.5 70.5 406.4
27.5 69.5 344.8
25.5 69.5 352.8
26.5 68.5 313.1
26.5 77.5 201.6
27.5 73.5 144.2
30.5 76.5 130.7
29.5 76.5 149
33.5 73.5 67.1
22.5 70.5 440.6
22.5 69.5 295.7
22.5 71.5 440.3
25.5 67.5 230.7
29.5 77.5 150.7
24.5 69.5 394.8
22.5 72.5 409.2
26.5 72.5 272
23.5 72.5 477.2
26.5 67.5 141.9
24.5 72.5 376.8
26.5 76.5 158.8
29.5 78.5 152.2
25.5 72.5 331.3
30.5 70.5 89.8
27.5 74.5 384.6
23.5 73.5 372.3
33.5 61.5 14.3
26.5 73.5 230.3
27.5 76.5 160.2
26.5 78.5 113
25.5 78.5 311.7
30.5 77.5 51
25.5 74.5 141.1
26.5 74.5 172.7
27.5 67.5 97.9
22.5 74.5 292.9
23.5 78.5 88
31.5 76.5 85.2
24.5 73.5 142.1
26.5 75.5 115.9
27.5 75.5 201.5
25.5 76.5 145
25.5 73.5 203.2
24.5 74.5 214.4
23.5 74.5 269.9
24.5 76.5 192
24.5 75.5 199.5
27.5 60.5 29.4
22.5 76.5 87.9
24.5 78.5 184.6
28.5 67.5 22
22.5 73.5 496.8
23.5 75.5 218.8
31.5 65.5 17.6
22.5 77.5 216.6
23.5 77.5 167.3
26.5 60.5 42.3
26.5 65.5 14.9
22.5 78.5 119.4
31.5 66.5 150.7
34.5 67.5 3386.3
32.5 63.5 0
36.5 63.5 0
36.5 64.5 0
35.5 62.5 0
36.5 62.5 0
36.5 60.5 0
36.5 72.5 0
36.5 73.5 0
38.5 72.5 0
36.5 74.5 0
37.5 73.5 0
38.5 73.5 0
37.5 74.5 0
34.5 76.5 0
30.5 61.5 0
25.5 61.5 0
33.5 76.5 0
35.5 76.5 0
25.5 65.5 0
34.5 77.5 0
25.5 62.5 0
25.5 64.5 0
24.5 67.5 0
31.5 78.5 0
25.5 63.5 0
36.5 78.5 0
36.5 75.5 0
36.5 76.5 0
33.5 77.5 0
36.5 77.5 0
26.5 61.5 0
26.5 62.5 0
32.5 77.5 0
34.5 78.5 0
33.5 78.5 0
32.5 78.5 0
32.5 72.5 0
35.5 77.5 0
35.5 78.5 0
22.5 75.5 0
27.5 61.5 0
34.5 63.5 0
38.5 68.5 0
38.5 69.5 0
38.5 67.5 0
36.5 69.5 0
32.5 61.5 0
38.5 70.5 0
37.5 70.5 0
35.5 64.5 0
33.5 70.5 0
32.5 75.5 0
33.5 62.5 0
36.5 70.5 0
32.5 65.5 0
35.5 66.5 0
29.5 67.5 0
35.5 68.5 0
37.5 76.5 0
33.5 74.5 0
34.5 73.5 0
38.5 75.5 0
35.5 65.5 0
35.5 69.5 0
31.5 69.5 0
27.5 65.5 0
34.5 70.5 0
29.5 66.5 0
32.5 76.5 0
28.5 66.5 0
32.5 69.5 0
32.5 66.5 0
33.5 65.5 0
34.5 69.5 0
35.5 67.5 0
33.5 63.5 0
32.5 67.5 0
35.5 71.5 0
31.5 68.5 0
33.5 75.5 0
31.5 67.5 0
31.5 77.5 0
34.5 65.5 0
30.5 67.5 0
32.5 68.5 0
33.5 69.5 0
33.5 66.5 0
34.5 64.5 0
35.5 72.5 0
32.5 64.5 0
33.5 67.5 0
33.5 68.5 0
34.5 68.5 0
34.5 74.5 0
32.5 70.5 0
37.5 71.5 0
34.5 66.5 0
35.5 70.5 0
35.5 73.5 0
34.5 75.5 0
34.5 72.5 0
32.5 62.5 0
38.5 74.5 0
38.5 71.5 0
26.5 64.5 0
26.5 66.5 0
30.5 69.5 0
33.5 64.5 0
29.5 61.5 0
30.5 68.5 0
30.5 78.5 0
&这是图片(这里的形状文件没有上传,为什么我在这里分享图片)
&我想要的是下面显示的地图之一