how can I plot a graph over an image in Matlab?
古いコメントを表示
採用された回答
その他の回答 (2 件)
Adam Danz
2022 年 6 月 30 日
2 投票
Plot the image using image or imagesc or some other image function that allows you to specify the x and y values of the image. That way you set the image coordinates to the data coordinates.
Then just hold on and plot the data into the same axes.
Note that image functions flip the y axis so you may need to flip it back to normal using set(gca, 'YDir','Normal') or flip your data when you plot it.
If you have additional questions, share the code you've got so far and let us know specificially where you're stuck.
Rik
2022 年 6 月 30 日
You need to use the same axes. The easiest solution is to use hold, probably the line below will already do what you need:
hold(gca,'on')
カテゴリ
ヘルプ センター および File Exchange で Images についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!







