help-octave
[Top][All Lists]
Advanced

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

Re: Data cursor in Octave


From: Pantxo Diribarne
Subject: Re: Data cursor in Octave
Date: Thu, 9 Feb 2017 13:16:58 +0100

There is nothing like this currently in Octave but it had been a while since I wanted to give it a try.
I attached a draft function that should do what you want. It only works when there is a single axes in the figure and only points to line objects:

plot (rand (20, 4)
h = datacursor ();

%% get the coordinates of the data cursor
x = get (h, "x")(2);
y = get (h, "y")(2);


Pantxo

Attachment: datacursor.m
Description: Text Data


reply via email to

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