LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plot different colors for thresholds above, in range, and below

I am working on a project that reads data from a com port and graphs the data.  For one set of data, I need to check to see if the data is above/below a threshold.  I would like the color for the data that is in between the upper and lower thresholds to be a certain color, and the data that is above or below to be to be a different color than the safe range.  I have figured out how to get either the above or below to work but not at the same time.  Here is an example vi that depicts what I have done so far but is simplified to the extent you do not need to receive any data.  Any help on this would be appreciated.

0 Kudos
Message 1 of 3
(2,671 Views)

 

I add some code to your solution using the same principle (adding NAN-lines)  😉

How many colors you want? Just add thresholds in the array 🙂 

Still room for improvements 😉 

look, there are gaps between the lines, and the -10 should be -INF 😉

one line n colors.png

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 3
(2,661 Views)

Thank you for your input.  What you did helped me to understand what I needed to do.  I knew it was something simple, just had some trouble getting it done.

0 Kudos
Message 3 of 3
(2,643 Views)