フィルターのクリア

Use slider parameter to plot over image

1 回表示 (過去 30 日間)
Giorgio
Giorgio 2013 年 10 月 2 日
コメント済み: Image Analyst 2013 年 10 月 3 日
I created a script containing axes and a slider following GUI guide. I was able to plot a function depending by parameters related to the slider. I would like to plot the graph of the function over a given image. How could i do that?

採用された回答

Image Analyst
Image Analyst 2013 年 10 月 2 日
編集済み: Image Analyst 2013 年 10 月 2 日
Use "hold on" and then call plot. Realize thought that the y axis direction is flipped so you need to set ydir = 'reverse' when you do the plot. And the x axis values must correspond to pixels, like they do for the image.
  2 件のコメント
Image Analyst
Image Analyst 2013 年 10 月 2 日
Giorgios comment moved here since it it not an "Answer":
Ok, but this way I overwrite every function I plot scrolling the slider...
Image Analyst
Image Analyst 2013 年 10 月 2 日
It should not, not if you used "hold on" like I said. You'll have to show your code including imshow(), hold on, and plot() before we can debug more.

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

その他の回答 (1 件)

Giorgio
Giorgio 2013 年 10 月 3 日
Sorry, I wrote bad. I would like every function plotted overwrite the previous one. I need there is only one function plotted over the image.
  3 件のコメント
Giorgio
Giorgio 2013 年 10 月 3 日
But I must plot the graph over the image. Anyway i solved using
cla(hAx,'reset')
Thanks for all.
Image Analyst
Image Analyst 2013 年 10 月 3 日
The graph will not be over any image you put into the axes. Using cla reset will totally blow away the image in the axes and replace it with just the graph alone.

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

カテゴリ

Help Center および File ExchangeSpecifying Target for Graphics Output についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by