how to place a image on a specific coordinates of figure

조회 수: 89 (최근 30일)
Stalin Samuel
Stalin Samuel 2017년 5월 29일
댓글: Walter Roberson 2017년 5월 29일
I wants to place a image on a specific coordinates of figure. Refer the attached image for more understanding

채택된 답변

Walter Roberson
Walter Roberson 2017년 5월 29일
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
Stalin Samuel
Stalin Samuel 2017년 5월 29일
편집: Stalin Samuel 2017년 5월 29일
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 2017년 5월 29일
Yes.
plot(30*rand(1,20));
hold on
d = imread('cameraman.tif');
image(flipud(d), 'XData', [6 10], 'YData', [7 20]);

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by