how to place a image on a specific coordinates of figure

59 views (last 30 days)
I wants to place a image on a specific coordinates of figure. Refer the attached image for more understanding

Accepted Answer

Walter Roberson
Walter Roberson on 29 May 2017
You can use image() or imshow(), passing them XData and YData options for the coordinates. The explanation in the image() documentation is much better for what those values represent: please be sure to read the documentation as it is not quite what you would expect.
  2 Comments
Stalin Samuel
Stalin Samuel on 29 May 2017
Edited: Stalin Samuel on 29 May 2017
Using plot command i already have some objects in the figure. In addition with that i wants to place a image. Is it possible?
Walter Roberson
Walter Roberson on 29 May 2017
Yes.
plot(30*rand(1,20));
hold on
d = imread('cameraman.tif');
image(flipud(d), 'XData', [6 10], 'YData', [7 20]);

Sign in to comment.

More Answers (0)

Categories

Find more on Display Image in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!