octave-patch-tracker
[Top][All Lists]
Advanced

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

[Octave-patch-tracker] [patch #9280] Data cursor for Octave 4.0.x and 4.


From: Roland Baudin
Subject: [Octave-patch-tracker] [patch #9280] Data cursor for Octave 4.0.x and 4.2.x
Date: Mon, 6 Mar 2017 03:56:06 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux i586; rv:45.0) Gecko/20100101 Firefox/45.0

URL:
  <http://savannah.gnu.org/patch/?9280>

                 Summary: Data cursor for Octave 4.0.x and 4.2.x
                 Project: GNU Octave
            Submitted by: roland65
            Submitted on: Mon 06 Mar 2017 08:56:05 AM UTC
                Category: Core : new feature
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Thanks to the work of Pantxo Diribarne (look here), 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 attached 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...

Note that, when you do a right mouse click, position the mouse *on the arrow
head* and not on the text, otherwise the data cursor will move to the mouse
position.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mon 06 Mar 2017 08:56:05 AM UTC  Name: datacursor.zip  Size: 6kB   By:
roland65

<http://savannah.gnu.org/patch/download.php?file_id=39902>
-------------------------------------------------------
Date: Mon 06 Mar 2017 08:56:05 AM UTC  Name: figure.png  Size: 49kB   By:
roland65

<http://savannah.gnu.org/patch/download.php?file_id=39903>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?9280>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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