s(i, 2) = px(i) s(i, 3) = py(i) Next i '散点
Dim Index As Integer
Index = 1 '设置图标类型为非自动选择,这样可以设置为自己需要的类型 MSChart2.Plot.SeriesCollection(Index).ShowLine = False '去除连线!!
MSChart2.Plot.SeriesCollection.Item(Index).SeriesMarker.Auto = False With MSChart2.Plot.SeriesCollection.Item(Index).DataPoints.Item(-1).Marker .Visible = True '散点的点是否可见 .Size = 120 '散点的大小
.Style = VtMarkerStyleFilledDiamond '选择菱形的 .FillColor.Automatic = False '颜色不自动填充
.FillColor.Set 400, 15, 400 '设置为紫红色
.Pen.VtColor.Set 400, 15, 400 '同样这个也必须设置,否则中间有默认的颜色
End With
With Form1.MSChart2
.Plot.Axis(VtChAxisIdX, 0).AxisTitle = \ .Plot.Axis(VtChAxisIdY, 0).AxisTitle = \
.Title.Text = \与t关系曲线\End With '显示图形
MSChart2.Column = 2
MSChart2.Plot.UniformAxis = False '自动调节图形大小 MSChart2.ChartData = s End Sub
Private Sub d3_Click()
'含水率fw与时间t的关系曲线
23
MSChart3.Visible = True ReDim px(yt), py(yt), s(yt, 3) 'st = yt / 500 For i = 1 To mn px(i) = i
py(i) = 100 * (1 - 10 ^ (-(aa + ab * ynp(i) + Log(2.303 * ab) / Log(10)))) '含水率fw公式 If py(i) < 0 Then py(i) = 0
'实际散点 s(i, 0) = px(i) s(i, 1) = fw(i)
'预测曲线 s(i, 2) = px(i) s(i, 3) = py(i) Next i '散点
Dim Index As Integer
Index = 1 '设置图标类型为非自动选择,这样可以设置为自己需要的类型 MSChart3.Plot.SeriesCollection(Index).ShowLine = False '去除连线!! MSChart3.Plot.SeriesCollection.Item(Index).SeriesMarker.Auto = False With MSChart3.Plot.SeriesCollection.Item(Index).DataPoints.Item(-1).Marker .Visible = True '散点的点是否可见 .Size = 120 '散点的大小
.Style = VtMarkerStyleFilledDiamond '选择菱形的 .FillColor.Automatic = False '颜色不自动填充 .FillColor.Set 400, 15, 400 '设置为紫红色
.Pen.VtColor.Set 400, 15, 400 '同样这个也必须设置,否则中间有默认的颜色
End With
With Form1.MSChart3
.Plot.Axis(VtChAxisIdX, 0).AxisTitle = \ .Plot.Axis(VtChAxisIdY, 0).AxisTitle = \
24
.Title.Text = \与t关系曲线\End With '显示图形
MSChart3.Column = 2
MSChart3.Plot.UniformAxis = False '自动调节图形大小 MSChart3.ChartData = s End Sub
Private Sub z1_Click() 'Weibull曲线
Form2.MSChart1.Visible = True ReDim s(ub, 3) s(0, 0) = 0 s(0, 1) = a1
s(1, 0) = t(ub) ^ (bb1 + 1) s(1, 1) = a1 + a2 * t(ub) ^ (bb1 + 1) For i = 0 To ub Step 1
s(i, 0) = t(i) ^ (bb1 + 1)
s(i, 1) = Log(q0(i) / (t(i) ^ bb1)) / Log(10) '实际散点
s(i, 2) = t(i) ^ (bb1 + 1) s(i, 3) = a1 + a2 * t(i) ^ (bb1 + 1) Next i
'横纵坐标表示
With Form2.MSChart1
.Plot.Axis(VtChAxisIdX, 0).AxisTitle = \ .Plot.Axis(VtChAxisIdY, 0).AxisTitle = \
.Title.Text = \曲线\End With
25
'散点
Dim Index As Integer
Index = 1 '设置图标类型为非自动选择,这样可以设置为自己需要的类型 Form2.MSChart1.Plot.SeriesCollection(Index).ShowLine = False '去除连线 Form2.MSChart1.Plot.SeriesCollection.Item(Index).SeriesMarker.Auto = False With Form2.MSChart1.Plot.SeriesCollection.Item(Index).DataPoints.Item(-1).Marker .Visible = True '散点的点是否可见 .Size = 80 '散点的大小
.Style = VtMarkerStyleFilledDiamond '选择菱形的 .FillColor.Automatic = False '颜色不自动填充 .FillColor.Set 300, 30, 300 '设置为黑色 .Pen.VtColor.Set 300, 30, 300
End With
Form2.MSChart1.Column = 2
Form2.MSChart1.Plot.UniformAxis = False Form2.MSChart1.ChartData = s Form2.Show End Sub
Private Sub z2_Click()
'乙型水驱规律曲线
Form2.MSChart2.Visible = True ReDim px(ub), py(ub), s(ub, 3) s(0, 0) = 0 s(0, 1) = aa s(1, 0) = np(ub) s(1, 1) = aa + ab * np(ub) For i = 0 To ub Step 1
s(i, 0) = np(i) '实际散点 s(i, 1) = lp(i) s(i, 2) = np(i)
26
s(i, 3) = np(i) * ab + aa Next i '散点
Dim Index As Integer
Index = 1 '设置图标类型为非自动选择,这样可以设置为自己需要的类型 Form2.MSChart2.Plot.SeriesCollection(Index).ShowLine = False '去除连线 Form2.MSChart2.Plot.SeriesCollection.Item(Index).SeriesMarker.Auto = False With Form2.MSChart2.Plot.SeriesCollection.Item(Index).DataPoints.Item(-1).Marker .Visible = True '散点的点是否可见 .Size = 80 '散点的大小
.Style = VtMarkerStyleFilledDiamond '选择菱形的 .FillColor.Automatic = False '颜色不自动填充 .FillColor.Set 400, 40, 400 '设置为黑色
.Pen.VtColor.Set 400, 40, 400 '同样这个也必须设置,否则中间有默认的颜色
End With
'横纵坐标表示 With Form2.MSChart2
.Plot.Axis(VtChAxisIdX, 0).AxisTitle = \
.Plot.Axis(VtChAxisIdY, 0).AxisTitle = \
.Title.Text = \乙型水驱规律曲线\End With
Form2.MSChart2.Column = 2
Form2.MSChart2.Plot.UniformAxis = False Form2.MSChart2.ChartData = s Form2.Show End Sub
27