How to Plot list
I m wondering to plot points in a graph,here i have a data generated in datatable with two parameters at same time i want to plot them,e.g if x and y how can i plot my whole data list in C#,can anyone help me?...please tell me the solution...thanks!
Bechir BejaouiPosted Dec 11, 2008, 10:01 AM
Graphics myGraphic;
List
private void Form1_Load(object sender, EventArgs e)
{
myGraphic = this.CreateGraphics();
myPointList = new List
myPointList.Add(new Point(12, 14));
myPointList.Add(new Point(24, 28));
myPointList.Add(new Point(50, 60));
myPointList.Add(new Point(80, 14));
myPointList.Add(new Point(13, 20));
myPointList.Add(new Point(10, 50));
this.Paint += new PaintEventHandler(Form1_Paint);
}
private void Form1_Paint(object sender, PaintEventArgs e)
{
e.Graphics.DrawCurve(new Pen(Color.Black), myPointList.ToArray());
}