DrawInsideOutside¶
(Source code
, png
)
- DrawInsideOutside(*args)¶
Draw the 2D projections of a sample, colored according to whether or not the points belong to the domain. The projections grid is returned as a
GridLayout
.- Parameters:
- domain
Domain
Domain on which each point is tested: does the domain contain it or not.
- sample2-d sequence of floats
Sample with the same dimension as the domain.
- inColorstr
Color used to draw points belonging to the domain.
- outColorstr
Color used to draw points not belonging to the domain.
- domain
Notes
Draws the 2D projections of the sample onto all coordinate pairs in the domain space. Each sample is drawn as a small square colored with the color inColor if it belongs to the domain and with the color outColor otherwise.
The limits of the graphs are those of the sample.
Examples
>>> import openturns as ot >>> from openturns.viewer import View >>> domain = ot.Interval([-2.0, -1.0, 1.0], [2.0, 1.0, 3.0]) >>> uniform = ot.Uniform(-3.0, 4.0) >>> dist = ot.JointDistribution([uniform] * 3) >>> sample = dist.getSample(200) >>> grid = ot.VisualTest.DrawInsideOutside(domain, sample) >>> View(grid).show()
Examples using the function¶
Draw minimum volume level sets
Draw minimum volume level sets