DIAdem Help

Object: 2DBoxWhisker

  • Updated2024-09-12
  • 1 minute(s) read

Object: 2DBoxWhisker

The 2DBoxWhisker object provides the properties of a curve of a 2D axis system in the Box Whisker display mode.

The following example generates a 2D axis system with the Box-Whisker display type and configures the box:

VBScriptPython

 

Dim oMy2DAxisSystem, oMyCurve, oMyPos, oMyShape, oMyYChannels, oMySettings
Call Data.Root.Clear()
Call DataFileLoad(ProgramDrv & "Examples\Data\EXPL_Legend.tdm","TDM","")
Call Report.NewLayout()
Set oMy2DAxisSystem = Report.ActiveSheet.Objects.Add(eReportObject2DAxisSystem, "My2DAxisSystem")
Set oMyPos = oMy2DAxisSystem.Position.ByCoordinate
oMyPos.X1 = 20
oMyPos.X2 = 80
oMyPos.Y1 = 20
oMyPos.Y2 = 80
Set oMyCurve = oMy2DAxisSystem.Curves2D.Add(e2DShapeBoxWhisker, "MyCurve")
Set oMyShape = oMyCurve.Shape
oMyShape.XChannel.Reference = "" 
Set oMyYChannels= oMyShape.YChannels
Call oMyYChannels.RemoveAll()
Call oMyYChannels.Add("[1]/X_Channel")
Call oMyYChannels.Add("[1]/Z_Channel_1")
Call oMyYChannels.Add("[1]/Z_Channel_2")
Call oMyYChannels.Add("[1]/Z_Channel_3")
Call oMyYChannels.Add("[1]/Z_Channel_4")
Call oMyYChannels.Add("[1]/Z_Channel_5")

Set oMySettings = oMyShape.Settings
Call oMySettings.BorderLine.Color.SetPredefinedColor(eColorIndexBlue)
Call oMySettings.Filling.Color.SetPredefinedColor(eColorIndexDarkRed)
Call Report.Refresh()

Returned From

2DCurve.Shape