LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change color of negative points in waveform chart for log scaling

Solved!
Go to solution

I have data that may be positive or negative and have a large dynamic range. I want to plot in log scale, so I want to abs() the data and then if it was negative, make it a different color. I saw this post from 2015 implying that I can't do that because the entire line has to be the same color, and they did some tricks with multiple lines: https://forums.ni.com/t5/LabVIEW/Change-point-color-in-graph-if-it-s-inside-a-certain-range/m-p/3193...

 

This seems weird though, because having negative data on a log scale in a different color is a fairly standard technique and I would have though that LV would have some les kludgy way to handle it. 

 

Is there a way to color individual points in a chart via some sort of filter? Or, alternatively, can the waveform chart in some way "handle" negative data on a log scale via some config setting to just change the color and abs it? 

0 Kudos
Message 1 of 3
(721 Views)
Solution
Accepted by topic author AlexGSFC

Hi Alex,

 


@AlexGSFC wrote:

Is there a way to color individual points in a chart via some sort of filter? Or, alternatively, can the waveform chart in some way "handle" negative data on a log scale via some config setting to just change the color and abs it? 


Simple solution: sort (and divide) your data into a "positive" and a "negative" part. Then put each part into its own plot, replace "missing" points by "NaN" data. Each plot will have its own color…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(654 Views)

Yeah, that is what they talked about in that other post I linked. I was hoping that there was a less kludgy way to do it. Having different colored points on a line seems like a fairly simple and standard thing, but I guess it is what it is. 

 

Thanks!

0 Kudos
Message 3 of 3
(619 Views)