How to plot XY graph in C#?

phillip picture phillip · Feb 15, 2011 · Viewed 7.5k times · Source

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 see 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.

Answer

Davide Piras picture Davide Piras · Feb 15, 2011

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.