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]:
../../_images/examples_probabilistic_modeling_draw_1d_distribution_3_0.svg
In [9]:
# draw CDF
distribution.drawCDF()
Out[9]:
../../_images/examples_probabilistic_modeling_draw_1d_distribution_4_0.svg