Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I select or identify multiple points on a scatter graph?

I would like to display time series data in a scatter plot.  The data by nature is "noisy" automatic filters to remove noise are only mariginally effective.  User interaction is required to remove more obvious noise.
 
Is there a way to have the user "select" a window of data (without zooming in or out) and get an array of data that has the index of the points (there might be several) that the user has selected?
 
Essentially I would like to give the user the ability to select single or multiple points and either delete them from the time series or flag them as bad (maybe show them with a different color).
 
Is this easily possible with built in functions or do I need to write a whole pile of code.
 
BTW, using C#...
 
Thanks
 
 
0 Kudos
Message 1 of 6
(4,815 Views)
This is a quick and dirty example, but it shoud give you what you're looking for. It uses mstudio 8.1 and VS2005. You might need to re-add the assembly references if you are using an older version.

Run the example, right-click on the graph and choose Add Window. This will add two cursors that highlights the data between them. I didn't add any resizing functionality to it, but you could easily add that. The data is highlighted via a hidden plot.

Hope this helps

Bilal Durrani
NI
0 Kudos
Message 2 of 6
(4,795 Views)

Hello Bilal,

Thanks for the response, however that is only half of what I asked.  Locating a series of points between two vertical limits is relatively straightforward (as you have shown).  The real trick is to do it with a box (ie have a set of vertical bars as well).

Assume for the moment that we have the following series fo points

point 1: x =1, y=10

point 2: x=2, y=11

point 3: x=3, y=10

point 4: x=4, y=100

point 5: x=5, y=10

point 6: x=6, y=95

point 7: x=7,y=11 etc...

Your method would select point 5 as well.  What I would like to do is draw a box around points 4 & 6 and have a method which would return the indexes for points 4 and 6, but exclude point 5 (which is quite well behaved).

The ability to draw a box and zoom in is readily available.  I simply don't want to zoom in but get the indexes of the points in the box I drew on the screen...

Any asisstance is greatly appreciated.

 

0 Kudos
Message 3 of 6
(4,789 Views)
Hi,

Attached is an example that allows you to draw a box on the graph.  It will then add 4 cursors (left, right, top, and bottom) to show the boundaries of the box you had drawn and it will highlight any data points that are within those boundaries.  Take a look at this example and let me know if you have any questions.
Message 4 of 6
(4,756 Views)
Here is another version that uses rubberbands to select an area. It's not a perfect example, but it will get you started.

Bilal Durrani
NI
Message 5 of 6
(4,746 Views)

Outstanding...

I now have more then enough information to be dangerous.  I appreciate all the help.

Thanks

0 Kudos
Message 6 of 6
(4,689 Views)