Code covered by the BSD License  

Highlights from
Interactive Data Navigation Pane Widget

4.6

4.6 | 6 ratings Rate this file 27 Downloads (last 30 days) File Size: 12.14 KB File ID: #23423
image thumbnail

Interactive Data Navigation Pane Widget

by Thomas Montagnon

 

25 Mar 2009

Widget to interactively & graphically select a section of a large dataset you want to work on

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

| Watch this File

File Information
Description

This widget will give you access to one of the most common task you have to perform when you manipulate large data sets:
Selecting within this large data set what portion of data you want to work on.

This easy to use widget will enable you to:

- Interactively define the section of your data set you want to work on. To do so you just have to drag and drop cursors that define the limits of your section

- Automatically execute callbacks when you start dragging one of the cursors, while you are dragging the cursor and when you release the cursor

See the demo_uiHistory.m file for a preview of how to use this widget.

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (9)
26 Mar 2009 Anon

First class coding! Nice work. I love the new classdef.

28 Mar 2009 Yair Altman

Very nice execution!

I was planning on doing something similar based on Google Finance's example, but with your submission there's really no need. An altogether excellent submission and a fine example of Matlab OOP.

A few suggestions:
1) uiHistory works on R2008a (Matlab 7.6) onward. You might consider some coding changes for it to work on R2007b and earlier: 'private' instead of private (and so on for other modifiers); not inheriting hgsetget etc.
2) You might consider modifying the cursor over the handle bars to right-left arrows (see my ScrollPlot submission for example)
3) You might consider setting the central patch (between the handle bars) draggable, so that the user can interactively pan the zoomed contents (again, see ScrollPlot for example)
4) You might consider enabling the two edit-boxes, so that users can enter specific dates.
5) You might consider adding a shading between the zoom patch below and the displayed graph above, just like in your screenshot. For some reason I don't see this on my R2008a/b.
6) You might consider adding to the main graph axes annual grid-lines (like in the zoom axes below) and tick labels (so that we know what event happened when)
7) Finally, I would suggest displaying the figure toolbar, or at least enable data-cursor mode (whose callback should be modified to display a human-readable date).

13 Apr 2009 Yan

For those who do not have 7.6 or later (uiHistory). same feature can be readily developed by using :
http://www.mathworks.com/matlabcentral/fileexchange/13857

25 Mar 2010 Robert Barrie  
25 Mar 2010 Robert Barrie  
25 Mar 2010 Robert Barrie

If you are doing time series data manipulation, you might also like Thomas' other example 'Graphical Points Selection'. Great work. Thanks heaps!

03 Jun 2011 farzad

sounds useful but I couldnt use it.
please consider the fact that not everyone here is advanced in MATLAB. How should we pass the inputs to this widget inside our code?
what is 'parent'? how should the 'data' be defined?

20 Jun 2011 Calvin Hsieh

Great submission.

However, I keep getting a "Input argument "cursorPosition" is undefined error. Can you comment?

28 Oct 2011 Sourin  
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
gui Thomas Montagnon 25 Mar 2009 16:09:24
cursor Thomas Montagnon 25 Mar 2009 16:09:24
object oriented Thomas Montagnon 25 Mar 2009 16:09:24
widget Thomas Montagnon 25 Mar 2009 16:09:24
plot Thomas Montagnon 01 Apr 2009 08:04:51
data exploration Thomas Montagnon 01 Apr 2009 08:05:11
potw Lindsay Coutinho 22 Jul 2011 10:37:37
pick of the week Lindsay Coutinho 22 Jul 2011 10:37:37

Contact us at files@mathworks.com