//curve 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 (" curve 1, "list1, Color Red, SymbolType. None).
//2 curve
PointPairList list2=new PointPairList ();
List2. Add (5, 11);
List2. Add (10, 40);
MyCurve2=zedGraphControl1. GraphPane. AddCurve (" curve 2 ", list2, Color, Blue,. ZedGraph SymbolType. None).
//refresh
ZedGraphControl1. AxisChange ();
ZedGraphControl1. Invalidate ();
Second curve target effect from point 1 (5, 11) to point 2 (10, 40), draw a line, the actual results of line from (1, 11) to drew a line (2, 40).
CodePudding user response:
Has been solved! The scattered pointsCodePudding user response:
CodePudding user response: