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일

0 개 추천

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일

0 개 추천

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

Image Analyst
Image Analyst 2013년 10월 3일
So then don't use hold on. By the way, your reply should have been a "Comment", not an "Answer" since it doesn't answer your question at the very top.
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.

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

카테고리

도움말 센터File Exchange에서 Convert Image Type에 대해 자세히 알아보기

질문:

2013년 10월 2일

댓글:

2013년 10월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by