Draw 2-d distribution graphsΒΆ

In this basic example we are going to draw PDF and CDF of a bidimensional distribution.

In [1]:
from __future__ import print_function
import openturns as ot

# assume a 2-d distribution
distribution = ot.Normal([0.0, 2.0], [1.0, 0.6], ot.CorrelationMatrix(2))
print(distribution)
Normal(mu = [0,2], sigma = [1,0.6], R = [[ 1 0 ]
 [ 0 1 ]])
In [2]:
# draw PDF
distribution.drawPDF()
Out[2]:
../../_images/examples_probabilistic_modeling_draw_2d_distribution_3_0.svg
In [3]:
# draw CDF
distribution.drawCDF()
Out[3]:
../../_images/examples_probabilistic_modeling_draw_2d_distribution_4_0.svg