Visualize pairsΒΆ

In this example we are going to a visualize a multidimensional sample by drawing each pair of 2-d marginal clouds.

In [13]:
from __future__ import print_function
import openturns as ot
In [14]:
# Create data to visualize
R = ot.CorrelationMatrix(3)
for i in range(1, 3):
    R[i, i - 1] = -0.4
distribution = ot.Normal([0.] * 3, [5.] * 3, R)
sample = distribution.getSample(200)
In [15]:
# Create a pairs graphs
graph = ot.Graph("Pairs graph", " ", " ", True, "")
pairs = ot.Pairs(sample, "Pairs example",
                 sample.getDescription(), "blue", "bullet")
graph.add(pairs)
graph
Out[15]:
../../_images/examples_data_analysis_visualize_pairs_4_0.svg