MAT Beh
MAT Beh

Reputation: 33

Insert 2 image on the figure when I have corresponding x and y coordinates

I need any guidance about how I can insert two .png images on the current figure (that is a map of the country) by having x and y coordinates of each png. I did this in PowerPoint (see the figure below) but as I have more than 2000 points it would be awesome if it is possible to do it by Matlab.

Click to view

The current figure is the country map and my two png's are these two colorful circles.

Thank you all

Upvotes: 3

Views: 38

Answers (1)

If_You_Say_So
If_You_Say_So

Reputation: 1283

Here is an easy approach: Say im1 is your circles map and im2 is the Iran's map.

im1 = ones(64);
im1(20:40,20:40) = 0.5; 
im2 = rand(64);

figure
imshow(im1,[]);
hold on
h = imshow(im2,[]);
h.AlphaData = 0.3; % or whatever Transparency makes you happy

Upvotes: 1

Related Questions