//第1條曲線
PointPairList list1 = new PointPairList();
for (int i = 0; i < 36; i++)
{
double x = i;
double y1 = 2*x + 1;
list1.Add(x, y1);
}
myCurve = zedGraphControl1.GraphPane.AddCurve("曲線1", list1, Color.Red, SymbolType.None);
//第2條曲線
PointPairList list2 = new PointPairList();
list2.Add(5, 11);
list2.Add(10, 40);
myCurve2 = zedGraphControl1.GraphPane.AddCurve("曲線2", list2, Color.Blue, ZedGraph.SymbolType.None);
//重繪
zedGraphControl1.AxisChange();
zedGraphControl1.Invalidate();
第二條曲線的目標效果是從點1(5,11) 到 點2(10, 40),畫一條線,實際結果畫的線是從(1,11) 到 (2, 40) 畫了條線.
uj5u.com熱心網友回復:
已解決!散分了uj5u.com熱心網友回復:
uj5u.com熱心網友回復:
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/14564.html
標籤:C#
下一篇:求助大神,兩個表單如何自動切換?
