[Top][All Lists]

[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 14:04:27 +0100

2017-02-09 13:16 GMT+01:00 Pantxo Diribarne <address@hidden>:
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);


I attached an updated version, the previous one had problems in the displayed coordinates and didn't handle log coordinates.

Attachment: datacursor.m
Description: Text Data

reply via email to

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