Effacer les filtres
Effacer les filtres

How can I save (and later recall) a graph as a variable?

37 vues (au cours des 30 derniers jours)
Louis-Philippe Guinard
Louis-Philippe Guinard le 30 Jan 2020
Modifié(e) : Stephen23 le 30 Jan 2020
I'm relatively new to MatLab so my issue may be a very basic thing I'm missing. I have a main image in which I want to iteratively select separate blobs (say I want to analyze 5 of them) delimitate a ROI and analyze the mean pixel value VS distance from the centroid of the blob, or VS the angle. So far I can display each graph in succession, but when the code is done running, it will only show the last plot (which is normal). I want to save each plot as a variable so that after the code is done running, I want to display, say, the second blob's graph to check the data.
So far I am able to save the blobs as separate images in a variable such as data(it).blob from which I would call imshow(data(2).blob) to show the image of the second blob. How can I do a similar thing, but for graphs? I tried the following, but it didn't seem to work:
plotData(it) = plot(something-or-the-other);
...then calling imshow(plotData(2)) but that doesn't seem to work. Any ideas? Thanks in advance!
  1 commentaire
Stephen23
Stephen23 le 30 Jan 2020
Modifié(e) : Stephen23 le 30 Jan 2020
You should read about graphics objects and their handles:

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by