Hello everyone,
I have 3 images that I want to plot each one in a certain x and y (latitude and longitude) coordinates. The latitude and longitude of each one are presented in a table.
In fact, I want to plot them on the existing figure (adding them) by 0.24 inches of height and 0.24 inches of weight for each of these 3 images. Since these images show the location of the 3 climate stations in the study region. Here is my current figure (I insert all of the code):
% read tif file
[A,R] = readgeoraster('DEM_30s.tif', 'OutputType', 'double');low_single = typecast(uint8([255 255 127 255]), 'single');mask = low_single==A;A = A - min(A(~mask), [], 'all');% creating colormap changing from white to brown as shown in image in the question
brown_color = [0.8 0.2 0.1];light_brown = [0.95 0.9 0.8];t = linspace(0, 1, max(A,[],'all'))';cmap = t.*brown_color + (1-t).*light_brown;gs = geoshow(A, cmap, R);gs.CData(repmat(mask,1,1,3)) = 255;axis equalbox onxticks(44:1:65);yticks(24:1:45);ax = gcaxlim(ax, xlim(ax)+range(xlim(ax))*[-.02, .02]) % add 2% of space to the left and right of the x limit
Here is the results:
It is possible to add images on it using this code:
hold on[img, ~, tr] = imread('img1.png');im = image('CData',flipud(img),'XData',[50 51],'YData',[35 36]);im.AlphaData = tr;hold off
But the problem is I want to use the coordinate table that I attached, to add on the existing figure (no change XData and YData manually) and have all small images in 0.24 inches height and weight. So if anyone can tell me what I should do I would be so grateful. I have more than 100 images and 100 corresponding coordinates and these 3 just for example that I cliped from original table.
I attached all 3 small images and the coordinate table. Also, tif file uploaded here my google drive.
Thank you so much ?
Best Answer