Extract XY data from figure plotted in appdesginer

8 views (last 30 days)
Hi,
I have seen some examples on how to extract data from Matlab figure but could it be done in GUI where figure was plotted by app designer?
Thank you,
Sasha

Answers (1)

Ameer Hamza
Ameer Hamza on 5 Jun 2020
Whether the data is plotted on axes() or uiaxes(), you can extract it using the handle of line object. Something like this
l = findall(fig, 'type', 'line') % fig is the handle of figure or uifigure object
l.XData % xdata of line
l.YData % ydata of line
  1 Comment
S.R.
S.R. on 5 Jun 2020
Hi Ameer,
When I plot data to figure I use: plot(app.PlotData,X,Y). Does the mean tha I could now use l=findall(app.PlotData, 'type', 'line'); l.XData ; l.YData ?
Thank you,

Sign in to comment.

Categories

Find more on Develop uifigure-Based Apps in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!