Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to display out of limit plot points

Solved!
Go to solution

WPF C#

 

Hi, I need to somehow mark points that are out of limit on my Graph of 4 LinePlotRenderers.  This is the data structure:

Point[,] dataArray = new Point[4,256];

 

At the moment I'm thinking to simply add 4 PointPlotRenderers to display those out of limit points (so it total I'll have 8 plots).  But I'm not sure what is the best way to pump this data into my graph.  If I always have the dataArray structured as above (4x256) and points out of limits could be blank, or any combination all the way to 4x256...  What's the best way to pump all of this data into my Graph?  I mean, I can't join them into the same 2D array because size of array of points out of limits is not going to be the same.  if I make it the same by padding with 0s then my Graph will shift to trying to display 0,0.

 

Does this make sense?  Maybe there's some other way to work with limits?

 

Thanks

0 Kudos
Message 1 of 3
(3,888 Views)
Solution
Accepted by kirko7

If you want to use the existing Point[,] rectangular array data source, you could pad the extra plots with NaN values (i.e. new Point( double.NaN, double.NaN )), which the graph will not display.


Alternatively, you could use a Point[][] jagged array data source, where the arrays for the out-of-range points would only contain the useful point values.


Also, you may be interested in the Range Masking Cursor demo (using your validation range, instead of a cursor).

~ Paul H
0 Kudos
Message 2 of 3
(3,873 Views)

Thanks, I didn't think of jagged array... elegant solution for my case.  .NaN is also nice to know.

 

Since every point in my graph has unique Standard Dev and Mean, I don't think Range Masking would work.  I made it work with PointPlotRenderer... Thank you for you help!

0 Kudos
Message 3 of 3
(3,868 Views)