help-octave
[Top][All Lists]
Advanced

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

RE: A hack to get a data cursor in Octave 4.0.x and 4.2.x


From: Reed, Darren K. (MSFC-ER42)
Subject: RE: A hack to get a data cursor in Octave 4.0.x and 4.2.x
Date: Wed, 1 Mar 2017 16:28:30 +0000


-----Original Message-----
From: Help-octave [mailto:address@hidden On Behalf Of roland65
Sent: Wednesday, March 01, 2017 6:50 AM
To: address@hidden
Subject: A hack to get a data cursor in Octave 4.0.x and 4.2.x

Hi,

thanks to the work of Pantxo Diribarne (look  here 
<http://octave.1599824.n4.nabble.com/Data-cursor-in-Octave-td4681801.html#a4681956>
), I was able to hack Octave to get a data cursor in 2D plots.

Here is how to do in Octave 4.0.x or 4.2.x:

In the attched zip file, you'll find three .m files. Copy these three files to 
<prefix>/share/octave/<version>/m/plot/draw/private , where <prefix> is /usr 
for Linux, c:\octave for Windows, etc. and <version> is Octave version number.

2. Launch Octave gui and plot some curve, like this:

x=[0:0.01:2*pi]; y=sin(x); plot(x,y);

Then you'll see the sinus curve in a figure window. In the figure menu, at the 
rightmost position, you'll see a new 'Data' menu item, where you can add a new 
data cursor, show/hide data cursors or get cursor data. See the attached 
screenshot as an example.

You can have several data cursors at the same time, with different colors, 
fonts, etc. Just right click on a data cursor to change its properties.

This works with nearly all 2D plots (semilogx, semilogy, loglog, subplot) but 
doesn't work with 3D plots (the Data menu is not displayed in this case).

There are some minor issues, but it works quite well...

datacursor.zip
<http://octave.1599824.n4.nabble.com/file/n4682075/datacursor.zip>
figure.png <http://octave.1599824.n4.nabble.com/file/n4682075/figure.png>  

------------------------------------------------------------------------------------------------------
Hello,
I am a Windows 7/64bit user and tried using the above scripts without success.  
I don't think I put them in the correct place.  Does anyone know where to put 
these files?  Or is there something else needed to do to make them work.  I was 
able to make the original data cursor work ??

Thanks,
Darren




reply via email to

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