From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-30-2019 04:56 AM
Hello, I have 2 questions:
1) is there a quick way to compute percentiles different from 25% (1st quartile), 50% (Median) and 75%(3rd quartile)? I notice that there is no possibility to choose the desired percentage in StatSel (StatBlockCalc) but maybe you can suggest me another function. In the opposite case, I will do it manually ordering the channel and choosing the X% value...
2) I read that boxplots are available in the 2019 beta version, no way to do them in 2015 version? Should I build them "manually" with lines and dots?
Thank you and kind regards,
Mattia
Solved! Go to Solution.
10-01-2019 12:23 AM
Hello Mattia,
I’m sorry, boxplots are new in DIAdem 2019 and for tats we extended the calculations for percentiles (0.025 and 0.975). In former DIAdem versions you can only do this yourself (or upgrade to DIAdem 2019)
Greetings
Walter
10-01-2019 09:29 AM - edited 10-01-2019 09:30 AM
I made a few "manual" box plots last year. Attached is the data and the TDR for the report. Run the following script on the data and refresh the report: (or get DIAdem 2019!)
'------------------------------------------------------------------------------- '-- VBS script file '-- Created on 06/11/2018 10:57:21 '-- Comment: Box Plot '------------------------------------------------------------------------------- Option Explicit 'Forces the explicit declaration of all the variables in a script. ' EXAMPLE CALL Call BoxPlotGroup(Data.Root.ChannelGroups("Data").Channels("RPM"), "Box Plot RPM", 1, 7, 4, 3, 5) Call BoxPlotGroup(Data.Root.ChannelGroups("Data").Channels("Temperature"), "Box Plot Temp", 8, 14, 11, 10, 12) ' Create a plottable box-whisker channel group for a channel ' ARG 1: Input channel ' ARG 2: Output group name ' ARG 3: Numeric left boundary of the box ' ARG 4: Numeric left boundary of the box ' ARG 5: Numeric vertical middle of the box ' ARG 6: Numeric left of the whisker ' ARG 7: Numeric right of the whisker ' RETURN: Nothing. A group with the supplied name will be created ' NOTES: No error checking implemented (Ex, if you supply a channel of DataTypeChnString it will crash Function BoxPlotGroup(chnl, boxGrpName, BoxLeft, BoxRight, BoxMid, WhiskLeft, WhiskRight) ' GET STATS Dim min, max, q1, med, q3 Call ChnStatisticsChannelCalc(chnl.GetReference(eRefTypeIndexName), 3608, 0, 0, 1, 0, 0, "NameName") min = chnl.Properties("Result~Statistics~ExtremeValues~Minimum").Value max = chnl.Properties("Result~Statistics~ExtremeValues~Maximum").Value q1 = chnl.Properties("Result~Statistics~Quantiles~LowerQuartile").Value med = chnl.Properties("Result~Statistics~Quantiles~Median").Value q3 = chnl.Properties("Result~Statistics~Quantiles~UpperQuartile").Value ' CREATE RESULT GROUP Dim boxGrp, i Dim Names: Names = Array("Upper Whisk", "Lower Whisk", "Lower Box", "Upper Box", "Middle Box", "Left Box", "Right Box", "Lower Whisk Connect", "Upper Whisk Connect") Dim x: x = Array(WhiskLeft, WhiskLeft, BoxLeft, BoxLeft, BoxLeft, BoxLeft, BoxRight, BoxMid, BoxMid) Dim x2: x2 = Array(WhiskRight, WhiskRight, BoxRight, BoxRight, BoxRight, BoxLeft, BoxRight, BoxMid, BoxMid) Dim y: y = Array(max, min, q1, q3, med, q1, q1, q1, q3) Dim y2: y2 = Array(max, min, q1, q3, med, q3, q3, min, max) Call Data.Root.ChannelGroups.Add(boxGrpName) Set boxGrp = Data.Root.ChannelGroups(boxGrpName) Call boxGrp.Properties.Add("Channel", chnl.GetReference(eRefTypeNameName), DataTypeString) Call boxGrp.Properties.Add("Measurement", chnl.Name, DataTypeString) Call boxGrp.Properties.Add("SampleSize", chnl.Size, DataTypeFloat64) For i = 0 To UBound(x, 1) Step 1 Call boxGrp.Channels.Add(Names(i) & " - x", DataTypeChnFloat64) Call boxGrp.Channels.Add(Names(i) & " - y", DataTypeChnFloat64) boxGrp.Channels(Names(i) & " - x").Values(1) = x(i) boxGrp.Channels(Names(i) & " - x").Values(2) = x2(i) boxGrp.Channels(Names(i) & " - y").Values(1) = y(i) boxGrp.Channels(Names(i) & " - y").Values(2) = y2(i) Next End Function
10-01-2019 10:01 AM
Hi gsklyr,
thank you, that is very useful! I don't find the .tdr, can you please check it? Possibly you forgot to attach it.
Mattia
10-01-2019 12:07 PM
whoops
10-02-2019 01:58 AM
Thank you!
Mattia
05-04-2020 10:07 AM - edited 05-04-2020 10:07 AM
Hi,
I am not able to see boxplot option in DIAdem 2019 plot. What could be the possible reason?
Thanks
Ashwini
05-05-2020 12:30 AM
Hi Ashwini,
Box-Whisker plots are part of the 2D-axis definition.
With the next DIAdem version, you will get an easier user interface for the REPORT objects.
Greetings
Walter