Working_Example_04

The objectives of this example are to:
  1. Build a GUI with two pages & a toolbar
  2. Create a number of axes with different plots - some have multiple plots.
  3. Link the data and the plots
    • In the demo the link is demonstrated both ways.
    • Only certain plots are linked/can be brushed.
  4. Initiate the brush capability on user defined plots on different axes.
  5. Demonstrate the ability to:
    • Brush using rect and lasso.
    • In axes containing multiple plots -> only user defined plots are brushed.
    • Brushing of data -> updates the source data (in the matpigui obj) which is reflected in the plots.
    • The video shows how to zoom using the iAxes capability.
    • Undo the brushing

The latest version of mbrush includes extra capability, 3D, data grouping and highlighting see here for full features..

see also mlink, mbrush.



The code to produce this example is included in the demo download example_linkBrush.p

Brushing & Linking Data



Screenshots are shown below:

Create a matpigui object which has 2 pages and load some data which contains 4 variables:

2 Pages: PrimaryPage & Secondary Page
Data variables:    X, Y, A & B.

On launch we can select the different pages from the toolbar:



The secondary image contains 1 linked plot and 1 plot which the user must update manually.
(This is used in the demo to prove the data link is working and provides the user to instant access to update the plot manually).



Data are selected using the mouse in either rect or freestyle (lasso):

The selected data are highlighted in all other plots which are linked.
Note: The lower plot contains otherData which is not brushed.


Including in other axes (and other data variables) - this is cross linking of vars


The data can be brushed using a number of methods. 
The example below is the data are replaced with NaN


After some data has been brushed - more data can be brushed:


The newly selected data has been brushed.
All plots updated.


The A v B plot can also be brushed
this is also highlighted in the other plots in the PrimaryPage.

Once the selected data are brushed the linked plots are updated.
Non linked plots have to be updated another way.

The other linked plots have been updated



The undo has complete brush history (3 below)