01-26-2024 05:11 AM
Hello!
From the plot below, I need to change the color of the parts of the curve that goes to 0 (so basically all the vertical segments). I don't know if it is possible directly from the report window or maybe throyugh a script. The priority is to delete them in order to show only the values <> 0, and the vertical segments introduce difficulty in reading the graph. Could you please help me? Thanks in advance!
Solved! Go to Solution.
01-29-2024 01:39 AM
Hey.
The data points which are equal to zero are valid and will be shown.
If you want to "switch off" these, you can set them to "invalid" (via script, all values =0 to change in "NoValue").
Then - I guess - the result should fit your expectations.
Don't forget to switch off the "interpolation of the curve between NoValues".
Greetings,
Vassili
01-29-2024 03:19 AM
Hello! Could you please help me by writing some strings to replace all the 0 values of the channel into "NoValue"? I'm not able to do it... thanks!
01-29-2024 03:57 AM
An easy way looks e.g. like this:
ChnEventResultList = ChnEventFind("A=0", Array("A"), Array(Data.GetChannel("[1]/MyDataChn")))
Call ChnEventCreateStatusChn("/WOZero", ChnEventResultList, "[1]/MyDataChn", 1, NOVALUE)
Call ChnMul("[1]/WOZero","[1]/MyDataChn", "/MyResultChn")
The first line is the code to a Diadem function "Event Search".
The formula is A=0, and the A is linked to your data channel (I used the name "MyDataChn" and assumed, it's in the 1st group).
The resulting channel is just a state (named "WOZero"), where the zeros are replaced by NV and others by 1.
Finally, multiplying this state channel with your data provides a new data channel, where zero values are replaced by NV.
I use to keep the original data unchanged, and create such new channels instead of "deleting" any information at all...
Greetings
01-29-2024 04:08 AM
Fantastic, it works! Thanks a lot, unfortunately I only received an ultra-basic training, I'm trying to learn by myself but no-paper material found, so...
Anyway, thanks again!