Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone,

I am trying to implement a graph in C#. I downloaded the ZedGraph library and tryed to figure out a way to implement the requirements but already got stuck when trying to plott a Normal Distribution (bell curve).

The requirements are following:
I need to be able to plott a Standard Normal Distribution out of the following formulae :
C#
y = (double)(1/Math.Sqrt(2 * Math.PI)) * Math.Exp((double)(-1/2) * Math.Pow(x, 2))


... and after some calculation - color a range of the curve to visualize a probability.

Now I am not sure how to visualize all of that stuff as the data is continuous and not only a set of discrete data.

I would really appreciate your help.

Cheers,
Haris
Posted
Comments
Andrew Rissing 16-Mar-12 10:10am    
The equation you posted is a bell curve. I'm not following what you're asking then....

1 solution

Maybe you should not be trying to use a general purpose library, they usually are oriented towards business grahics. You can manually do it in WinForms or WPF. Both support drawing lines. In WPF you can use the canvas, and draw lines on the canvas: http://msdn.microsoft.com/en-us/library/ms747393.aspx[^]. there should be quite a few resources available on the internet to tell you how to do drawing, either in WinForms or WPF.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900