how can I plot the .jpg into a different part of an axis

조회 수: 2 (최근 30일)
JIBIN
JIBIN 2023년 9월 25일
댓글: Rik 2023년 9월 25일

답변 (1개)

Rik
Rik 2023년 9월 25일
편집: Rik 2023년 9월 25일
You can use the image function to insert an image object in an axes.
Below you see an example. As you can see, you will have to flip the y-axis on the image yourself.
im = imread('peppers.png');
plot(1:10,rand(10,1))
axis([1 10 0 1])
hold on
x=linspace(2,4,size(im,1));
y=linspace(0.2,0.5,size(im,2));
image(x,y,im)
  댓글 수: 2
JIBIN
JIBIN 2023년 9월 25일
i created an image by matlabcode. now i want to place that image into different part of an axis
Rik
Rik 2023년 9월 25일
How did you try to adapt my example code? It doesn't sound like you should have any issues. What exactly is your question?

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

카테고리

Help CenterFile Exchange에서 Red에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by