# Draw 1-d distribution graphs¶

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

In [7]:

from __future__ import print_function
import openturns as ot

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

Gumbel(alpha = 2.2, beta = 0.6)

In [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.

Out[8]:

In [9]:

# draw CDF
distribution.drawCDF()

Out[9]: