Click here to Skip to main content
12,998,483 members (128,588 online)
Rate this:
Please Sign up or sign in to vote.
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 :
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.

Posted 16-Mar-12 4:04am
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

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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:[^]. there should be quite a few resources available on the internet to tell you how to do drawing, either in WinForms or WPF.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170622.1 | Last Updated 16 Mar 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100