0

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?)

3
  • Are you developing in Winforms, WPF, ASP.net or Silverlight? Commented Sep 20, 2010 at 8:05
  • He did actually mention windows forms in the question. Commented Sep 20, 2010 at 8:06
  • True, my mistake. Then as suggested you can use the chart control provided in the .net framework with a Point series Commented Sep 20, 2010 at 8:13

3 Answers 3

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks Ian for your answer. Can you tell me a bit more about GDI.
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.
0

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.

1 Comment

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

You may have a look at ZedGraph.

Example:
alt text

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.