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

2 vues (au cours des 30 derniers jours)
JIBIN
JIBIN le 25 Sep 2023
Commenté : Rik le 25 Sep 2023

Réponses (1)

Rik
Rik le 25 Sep 2023
Modifié(e) : Rik le 25 Sep 2023
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 commentaires
JIBIN
JIBIN le 25 Sep 2023
i created an image by matlabcode. now i want to place that image into different part of an axis
Rik
Rik le 25 Sep 2023
How did you try to adapt my example code? It doesn't sound like you should have any issues. What exactly is your question?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Red dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by