help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave - is there a possibilty to access the data of a plotted curve


From: Werner Koenig
Subject: Re: Octave - is there a possibilty to access the data of a plotted curve
Date: Thu, 05 Sep 2013 22:34:21 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20

On 05.09.2013 20:13, Ben Abbott wrote:
On Sep 5, 2013, at 1:21 PM, Werner Koenig wrote:

Hello List,

in  matlab there is a possiblity to have a direct
access to plotted curve. With the following code snippet
you get a curve a handle and therefor you can query
curve data  like XData, YData and so on.

h = gco;
co=get(h); % search for active curve
x = co.XData;
y = co.YData;

I have searched in the internet for a similar approach
to do it with octave, but I found no solution.
Is there a way to do this job with octave and when what
is the solution.

So long Werner
I don't think the gco() command is supported by Octave yet.  However the rest 
of it should work.

        h = plot (rand (1, 10));
        x = get (h, "xdata");
        y = get (h, "ydata");

Ben


Hello Ben, hello List,

you are right, it works. My problem now, is that I have to
save and manage the handles form different curves for
myself. But I think  over a global list, perhaps a global stack or
a file, I can do this job. With the gco() my job would be easier.

So long Werner








reply via email to

[Prev in Thread] Current Thread [Next in Thread]