Click here to Skip to main content
11,701,590 members (69,739 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# graphics
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.

Cheers,
Haris
Posted 16-Mar-12 4:04am
Haris122
Comments
Andrew Rissing at 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
good
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: 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.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 324
1 Maciej Los 275
2 Sergey Alexandrovich Kryukov 250
3 Mika Wendelius 189
4 CHill60 110
0 OriginalGriff 8,274
1 Sergey Alexandrovich Kryukov 7,317
2 CPallini 4,912
3 Maciej Los 4,146
4 Mika Wendelius 3,556


Advertise | Privacy | Mobile
Web04 | 2.8.150819.1 | Last Updated 16 Mar 2012
Copyright © CodeProject, 1999-2015
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