VisualTest_DrawEmpiricalCDF(sample, xMin, xMax)¶
Draw an empirical CDF as an OpenTURNS
- Available usages:
- VisualTest.DrawEmpiricalCDF(sample, Xmin, Xmax)
sample : 2-d sequence of float
Sample to draw.
Xmin, Xmax : float with Xmin < Xmax
Lower and upper boundaries of the graph.
The created graph contains a staircase curve which is the empirical CDF of the sample.
>>> import openturns as ot >>> from openturns.viewer import View
Generate a random sample from a Normal distribution:
>>> ot.RandomGenerator.SetSeed(0) >>> sample = ot.Normal(1).getSample(100) >>> Xmin = sample.getMin() >>> Xmax = sample.getMax()
Draw an empirical CDF:
>>> empiricalCDF = ot.VisualTest.DrawEmpiricalCDF(sample, Xmin - 1.0, Xmax + 1.0) >>> View(empiricalCDF).show()