Draw 1-d distribution graphs¶

In this basic example we are going to draw PDF and CDF of an unidimensional distribution.

[7]:

from __future__ import print_function
import openturns as ot

# assume an 1-d distribution
distribution = ot.Gumbel(0.45, 0.6)
print(distribution)

Gumbel(alpha = 2.2, beta = 0.6)

[8]:

# draw PDF
distribution.drawPDF()
# IMPORTANT: note that this command just generates the graph data
# and is only drawn in the context of Jupyter notebooks.
# To plot from a script, see the viewer module.

[8]:

[9]:

# draw CDF
distribution.drawCDF()

[9]: