VisualTest_DrawEmpiricalCDF

(Source code, png, hires.png, pdf)

../../_images/VisualTest_DrawEmpiricalCDF.png
VisualTest_DrawEmpiricalCDF(*args)

Draw an empirical CDF.

Available usages:
VisualTest.DrawEmpiricalCDF(sample) VisualTest.DrawEmpiricalCDF(sample, Xmin, Xmax)
Parameters:

sample : 2-d sequence of float

Sample to draw.

Xmin, Xmax : float with Xmin < Xmax

Lower and upper boundaries of the graph.

Returns:

graph : class:~openturns.Graph

The graph object

Notes

The created graph contains a staircase curve which is the empirical CDF of the sample.

Examples

>>> 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)

Draw an empirical CDF:

>>> empiricalCDF = ot.VisualTest.DrawEmpiricalCDF(sample)
>>> View(empiricalCDF).show()