Click here to Skip to main content
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 5: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 280
1 Jochen Arndt 150
2 Kornfeld Eliyahu Peter 120
3 PIEBALDconsult 110
4 Richard MacCutchan 105
0 OriginalGriff 6,055
1 DamithSL 4,621
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,500
4 Sergey Alexandrovich Kryukov 3,294


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