a Line to plot by using handles ?
Ältere Kommentare anzeigen
Hey Guys,
Monday Morning Question: I have got an array(1x40) holding new y-Data. Now I want to plot this data in an existing Plot. Of course i could use gca / get(...,'children') / x = get(children,'xdata') to replot, but is there anyway to add the new Data and replot by using the childrens handles ?
1 Kommentar
I'm not quite sure I understand which children's handles you mean.
If you keep hold of your axes handles then you don't need to use children and refind them at all, just a
hold( hAxes, 'on' )
plot( hAxes,... )
will do to be able to add new data to an existing plot.
I often have my axes embedded in my main gui so obviously they are easy to retrieve the handles of, but where I spawn a new figure I tend to store its axes (or figure handle, whichever I think more useful) on the handles structure of my GUI for retrieval.
Akzeptierte Antwort
Weitere Antworten (2)
Max Müller
am 18 Aug. 2014
0 Stimmen
5 Kommentare
Max Müller
am 18 Aug. 2014
Adam
am 18 Aug. 2014
Why don't you want to call plot? It is the function you would usually use to do what you want so why try to hack something into the axes children when you can just use a function designed to do what you want?
Max Müller
am 18 Aug. 2014
Max Müller
am 18 Aug. 2014
Bearbeitet: John Kelly
am 12 Feb. 2015
Max Müller
am 18 Aug. 2014
Max Müller
am 18 Aug. 2014
0 Stimmen
Kategorien
Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!