开发者

How to plot XY graph in C#?

I am developing an application in C# which deals with specific genetic algorithm problem. The execution of the algorithm provides output parameters that are required to draw a chart.The graphic chart consists of 2 independent axis, lets say X is number of generation and Y represents corresponding maximum value of fitness function. To be more specific, I've uploaded picture from Excel so here it is :

http://img97.imageshack.us/img97/2046/graphnb.png

My priority is to make this application fully-functional by allowing user (who sets random execution factors such as mutation percentage, population and generation number, number of elite individuals, etc.) to s开发者_如何学编程ee generated X-Y graph inside the generated "Form" in C#. I've found site that partially solves my problem, but that's not the whole point (http://csharp.net-informations.com/excel/csharp-excel-chart-picturebox.htm). So I'm asking if there is a way to implement mentioned graph by not using any other applications, but maybe only C# libraries and functions for plotting or something like that? Hope I made myself clear. Best regards.


Free and native answer is http://zedgraph.org/wiki/index.php?title=Main_Page

  • Does not involve WPF
  • Does not cost
  • Only C# libraries
  • Works inside a .NET WinForm


personally I like XtraChart of DeveloperExpress, but there are also many many other cheaper or more expensive alternatives, also other questions similar to yours here in SO: WPF chart controls

I like to use libraries whenever I can so I can focus on my real business case instead of trying to re-invent the wheel everytime, also because usually it's not trivial to reach the same level of results of people working hard to deliver specific components.


As all have said you have to work on WPF (different platform then WinForms) with 3rd party charting library that are much easier to integrate with your application. If you want to know further about charting library then you should see this page Click here


If you can use it, try WPF. It's much better for developing graphically rich user interfaces than standard Windows Forms -- especially if you don't want to use third-party libraries.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜