Can anyone please explain the syntax and purpose of plot() function?

I need to know if I can plot some (x,y) coordinate points on a .png file, for this purpose I need to know the proper syntax and usage of plot().

4 件のコメント

dpb
dpb 2015 年 1 月 22 日
All the syntax of plot is given at
doc plot
I have no idea what you mean when you say ...plot some (x,y) coordinate points on a .png file...
Explain precisely what you want as an end result; attaching a sample plot would likely be even better.
fawad khan
fawad khan 2015 年 1 月 23 日
The end result should be 25 points plotted on an image file.
dpb
dpb 2015 年 1 月 23 日
How do you plot on a file is the question?
If you really mean on a displayed image, then as the other respondent answered, you've simply got to scale to the image coordinates what it is that you wish to plot and have at it...
fawad khan
fawad khan 2015 年 1 月 23 日
Okay, thanks a lot.

サインインしてコメントする。

 採用された回答

Chad Greene
Chad Greene 2015 年 1 月 22 日

0 投票

If you're trying to plot x,y data on an image, you can do this:
imshow('coins.png')
hold on
plot(1:300,linspace(1,20,300).^2)
where units plotted by plot are in pixels. Or your x,y data have some units other than pixels, you'll have to figure out the right arrays of xdata and ydata corresponding to pixels in the image. Then you can specify 'xdata',xarray,'ydata',yarray when you call imshow.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGraphics Performance についてさらに検索

タグ

質問済み:

2015 年 1 月 22 日

コメント済み:

2015 年 1 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by