views:

152

answers:

5

I need to visualize some scientific calculations. I generally prefer reusing code if there is already a good available instead of inventing wheels each time, that's why I am asking. I need a C# code to draw charts (just outputting a bitmap is ok) of 2d (y=f(x)) and 3d (z=f(x,y)) digital data sets (where any axis can be float, int or datetime), sometimes combined.

If I go here and click 3D in the navigation bar on the left, there I can see what I need. But the cheapest version costs $759 there, looks scary for a hobby project of an east-european student :-(

+6  A: 

The Microsoft Chart Controls are free and very powerful. Microsoft bought the rights to the Dundas chart control and repackaged it. Is it simple? No, it's a very powerful control. But Microsoft also has good documentation and samples for it. The samples make it appear to be just bar/pie/etc type charts, but it can handle math oriented charting as well.

Matt Greer
Thanks. Yes, I was distracted by samples, I didn't know they are suitable for scientific charting. But as far as I can see the library is targeting .Net 3.5 and VS 2008. I am using .Net 4 and VS 2010. Will try anyway. Thanks.
Ivan
In that case, the chart control is included with .NET 4. Open up the toolbox in VS2010 and you'll see it in the data section.
Matt Greer
A: 

ZedGraph is fast, feature rich and easy to use. its my favorite charting control.

Jack
ZedGraph is 2D-only (y=f(x)). And not enough simple to be quickly extended to plot 3d (z=f(x,y)) data. I definitely need to plot real 3d (z=f(x,y))
Ivan
A: 

Why don't you just use Matlab, Mathmatica or similar?

Noon Silk
I am neither able to buy any of these expensive products, nor to spend nights learning them (while I already know C# and T-SQL). If considering learning something new and big, I believe it can prove more useful for me to learn basic Direct X. And as I've got very humble kind of mathematical background opposing significant IT experience, I am pretty much more comfortable thinking in terms of OOP and SQL than in formulas.
Ivan
A: 

The plplot package might do what you want. More details are here: http://plplot.sourceforge.net/

shuttle87
A: 

You may be able to interface to the R programming language from C# as at http://www.codeproject.com/KB/cs/RtoCSharp.aspx.

There's a lot of examples of graphs at http://addictedtor.free.fr/graphiques/allgraph.php which you may be able to convert to C# to do what you want.

David Morrissey