Hi, Muhammad. This is not an exact solution to your problem, but this is how you can do it. Firstly, I would create a structures that contains your data given in your text files.
For example, using your file ' 1-1000.txt ',
fid = fopen('1-1000.txt');
C = textscan(fid, '%f %f %f')
fclose(fid);
f = {'lat', 'long', 'temp'}
S = cell2struct(C,f,2);
Now I have a structure S that has three fields, .lat, .long and .temp.
Now we need two things. The first one is you need the map that is given in the back of your plots. Assuming that you have it, you can just load the map by
Then we need to change your decimal degrees (long and lat) to meters. There are many methods available, even mercator.m files available on the File Exchange. Generally, it should look something like this.
radian = degree * pi/180;
earth_radius = 6378.137;
lng = (x * radian - 135/180*pi) * earth_radius;
lat = atanh(sin(y)) * earth_radius;
Since you have a structures, it is better to write function mercator that your data can easily be implemented.
Finally, for the color variated map, you can use imagesc.
N = 1000;
[Xi, Yi] = meshgrid(linspace(37,42,N),linspace(-6.9,2.5,N));
Ci = griddata(A(:,2), A(:,1), A(:,3), Xi, Yi);
colormap ('hot')
imagesc(linspace(37,42,N),linspace(-6.9,2.5,N),Ci);
xlabel('Longitude');
ylabel('Latitude');
colorbar
Now, this will not instantly work. It will take quiet some time for you to search each function and implement it appropriately to your own data. The codes provided above might be confusing, but I wrote them merely to show you how they could be implemented.
Best Answer