DrawPairsMarginals

(Source code, png)

../../_images/DrawPairsMarginals.png
DrawPairsMarginals(sample, distribution)

Draw 2-d projections of a multivariate sample plus marginals.

Parameters:
sample2-d sequence of float

Samples to draw.

distributionDistribution

Distribution from which marginals are drawn

Returns:
graphGraph

The graph object

Examples

>>> import openturns as ot
>>> from openturns.viewer import View
>>> ot.RandomGenerator.SetSeed(0)
>>> dim = 3
>>> R = ot.CorrelationMatrix(dim)
>>> R[0, 1] = 0.8
>>> distribution = ot.Normal([3.0] * dim, [2.0]* dim, R)
>>> size = 100
>>> sample = distribution.getSample(size)
>>> distribution = ot.JointDistribution([ot.HistogramFactory().build(sample.getMarginal(i)) for i in range(dim)])
>>> clouds = ot.VisualTest.DrawPairsMarginals(sample, distribution)
>>> View(clouds).show()