iXYPlotX1.Channel(0).AddNull l单独使用和
iXYPlotX1.Channel(0).AddNull、iXYPlotX1.RemoveAllChannels、iXYPlotX1.AddChannel三条语句配合使用效果是不一样的。区别在哪里?自己动手试一下吧
[vb]
view plain
copy
- 1、配合使用
- Dim k As Single
- Dim s(5) As Single
- Dim i, j As Integer
- Dim lngDispBegin As Long
- Dim lngDispEnd As Long
- s(1) = 5
- s(2) = 7
- s(3) = 10
- s(4) = 8
- s(5) = 12
- iXYPlotX1.RemoveAllChannels
- iXYPlotX1.AddChannel
- iXYPlotX1.Channel(0).TraceLineStyle = iplsDash
- For j = 1 To 1
- For i = 1 To 5
- iXYPlotX1.Channel(0).AddXY i, s(i)
- s(i) = s(i) + 5
- Next
- iXYPlotX1.Channel(0).AddNull
- Next
绘图如下:
[vb]
view plain
copy
- 2、单独使用
- Dim k As Single
- Dim s(5) As Single
- Dim i, j As Integer
- Dim lngDispBegin As Long
- Dim lngDispEnd As Long
- s(1) = 5
- s(2) = 7
- s(3) = 10
- s(4) = 8
- s(5) = 12
- iXYPlotX1.Channel(0).TraceLineStyle = iplsDash
- For j = 1 To 1
- For i = 1 To 5
- iXYPlotX1.Channel(0).AddXY i, s(i)
- s(i) = s(i) + 5
- Next
- iXYPlotX1.Channel(0).AddNull
- Next
注意:iplsDash和iplsDot仅仅在TraceLineWidth = 1时候有效。
当TraceLineWidth》1时,iplsDash和iplsDot都默认成为iplsSolid