views:

86

answers:

3

I want to know that how to plot a graph in C#? Like i give input in form of coordinates (x,y) and get a graph plotted with these values? (I want to know that where will this graph be plotted, on windows form or any other control?)

+1  A: 

There are loads of packages for doing this sort of thing out there e.g. Dundas, Microsoft Charts or you can draw your own using GDI.

Ian
Thanks Ian for your answer. Can you tell me a bit more about GDI.
Learner
GDI is just the normal way you would manually draw things in C# using the Graphics context. E.g. Graphics.DrawLine(PointF, PointF); You'll find loads of examples if you google some C# Graphics tutorials.
Ian
A: 

You may have a look at ZedGraph.

Example:
alt text

Albin Sunnanbo
A: 

As lan said, there are many 3rd party controls available for drawing charts. Google for ".NET chart control" and judge for yourself what you like best.

If you're looking for an open source solution, I can recommend ZedGraph or nplot. There doesn't seem to be much recent activity on either of them, but they do support all major 2d chart types, are extensible and easy to use.

nikie
thanks for your answer, I want to ask that how can I use ZedGraph?
Learner