Use slider parameter to plot over image
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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?
0 commentaires
Réponse acceptée
Image Analyst
le 2 Oct 2013
Modifié(e) : Image Analyst
le 2 Oct 2013
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 commentaires
Image Analyst
le 2 Oct 2013
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
le 2 Oct 2013
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.
Plus de réponses (1)
Giorgio
le 3 Oct 2013
3 commentaires
Image Analyst
le 3 Oct 2013
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.
Voir également
Catégories
En savoir plus sur Specifying Target for Graphics Output dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!