DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Formatting curve colors on report

Solved!
Go to solution

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!

 

Piacioo_0-1706267441778.png

 

0 Kudos
Message 1 of 5
(781 Views)

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

0 Kudos
Message 2 of 5
(733 Views)

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!

0 Kudos
Message 3 of 5
(722 Views)
Solution
Accepted by topic author Piacioo

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

0 Kudos
Message 4 of 5
(716 Views)

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!

0 Kudos
Message 5 of 5
(709 Views)