From: Ida Haggstrom on
Hi!

I have a somewhat silly question I think... If you have a matlab figure (.fig) containing a 2D plot, is it possible to extract the matrix of X and Y values from the graph? I only have the figures, not the data....
I've tried "h = get(gca)", but I can't find anything in the handle that seems to be the actual data of the graph in the plot...

This may not at all be possible, but I figured I'd ask anyway!=)
Thanks!
Ida
From: Ida Haggstrom on
Dear all,
I just found the solution to my own problem! Seems I was just not looking hard enough.
a = get(gca);
b = h.Children;
b.XData and b.YData gives me the two vectors I want! =) (b(n).XData and b(n).YData gives you graph n if you have many in the axis).
Cheers,
Ida


"Ida Haggstrom" <ida_haggstrom(a)yahoo.se> wrote in message <hqk5og$8vg$1(a)fred.mathworks.com>...
> Hi!
>
> I have a somewhat silly question I think... If you have a matlab figure (.fig) containing a 2D plot, is it possible to extract the matrix of X and Y values from the graph? I only have the figures, not the data....
> I've tried "h = get(gca)", but I can't find anything in the handle that seems to be the actual data of the graph in the plot...
>
> This may not at all be possible, but I figured I'd ask anyway!=)
> Thanks!
> Ida