資源描述:
《mschart畫(huà)散點(diǎn)圖》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫(kù)。
1、PrivateSubForm_Load()DimMyData(20,1)AsDouble'-----x軸坐標(biāo)值-----Y軸坐標(biāo)值----------MyData(0,0)=0:MyData(0,1)=180'本句代表了:第一點(diǎn)數(shù)據(jù)的X軸坐標(biāo)為0,Y軸坐標(biāo)為180MyData(1,0)=6:MyData(1,1)=60MyData(2,0)=8:MyData(2,1)=60MyData(3,0)=11:MyData(3,1)=0MyData(4,0)=16:MyData(4,1)=0MyData
2、(5,0)=19:MyData(5,1)=60MyData(6,0)=25.8:MyData(6,1)=60MyData(7,0)=28.8:MyData(7,1)=0MyData(8,0)=31.8:MyData(8,1)=60MyData(9,0)=40.3:MyData(9,1)=60MyData(10,0)=43.3:MyData(10,1)=0MyData(11,0)=93.3:MyData(11,1)=0MyData(12,0)=96.3:MyData(12,1)=60MyData(
3、13,0)=99.3:MyData(13,1)=0MyData(14,0)=105.3:MyData(14,1)=0MyData(15,0)=135.3:MyData(15,1)=0MyData(16,0)=144.3:MyData(16,1)=180MyData(17,0)=148.8:MyData(17,1)=270MyData(18,0)=405.03:MyData(18,1)=270MyData(19,0)=409.53:MyData(19,1)=180MyData(20,0)=564.
4、17:MyData(20,1)=180'波形圖外觀設(shè)置WithMSChart1.TitleText="速度m/min"''設(shè)置圖線的外觀.Plot.SeriesCollection(1).Pen.Width=30.Plot.SeriesCollection(1).Pen.Style=VtPenStyleSolid''設(shè)置XY軸.Plot.Axis(VtChAxisIdX).ValueScale.Auto=False.Plot.Axis(VtChAxisIdY).ValueScale.Auto=F
5、alse'//設(shè)置最大值.Plot.Axis(VtChAxisIdX).ValueScale.Maximum=600'設(shè)置橫軸標(biāo)注最大值.Plot.Axis(VtChAxisIdY).ValueScale.Maximum=300'設(shè)置縱軸標(biāo)注最大值'//設(shè)置最小值.Plot.Axis(VtChAxisIdY).ValueScale.Minimum=0.Plot.Axis(VtChAxisIdX).ValueScale.Minimum=0'//.Plot.Axis(VtChAxisIdX).Val
6、ueScale.MajorDivision=6'X軸主要網(wǎng)格數(shù)量.Plot.Axis(VtChAxisIdY).ValueScale.MajorDivision=6'Y軸主要網(wǎng)格數(shù)量.Plot.Axis(VtChAxisIdX).ValueScale.MinorDivision=0'X軸次要網(wǎng)格數(shù)量.Plot.Axis(VtChAxisIdY).ValueScale.MinorDivision=0'Y軸次要網(wǎng)格數(shù)量.Plot.Axis(VtChAxisIdX).AxisGrid.MajorPen
7、.Style=VtPenStyleDotted.Plot.Axis(VtChAxisIdY).AxisGrid.MajorPen.Style=VtPenStyleDottedMSChart1.Plot.AutoLayout=FalseMSChart1.Plot.UniformAxis=FalseMSChart1.chartType=VtChChartType2dXY'設(shè)置圖形為二維散點(diǎn)圖MSChart1.ChartData=MyData'數(shù)據(jù)EndWithEndSubPrivateSubButt
8、on2_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesButton2.ClickMe.AxMSChart1.chartType=MSChart20Lib.VtChChartType.VtChChartType2dLineMe.AxMSChart1.ChartData=xDimiAsIntegerFori=1ToMe.AxMSChart1.RowCountIfiMod3=0ThenAxMSChart1.Row=iA