PlotDesign¶
-
PlotDesign
(design, bounds, Nx, Ny, figure=None, axes=[], plot_kwargs={}, axes_kwargs={}, text_kwargs={})¶ Plot a design using a scatter plot approach (plots 2D marginals).
In addition, the function plots a grid, i.e. horizontal and vertical lines to distinguish LHS character
- Parameters
- design2-d sequence of float
Design
- bounds: :class:`openturns.Interval`
Bounds of the underlying distribution
- nxdivint
Number of subdivisions in the X axis
- nydivint
Number of subdivisions in the Y axis
- Returns
- figmatplotlib figure
Figure representing the LHS
Examples
>>> import openturns as ot >>> from openturns.viewer import PlotDesign >>> # Bounds are [0,1]^5 >>> # Size of sample >>> size = 10 >>> # Factory: lhs generates (here centered) >>> distribution = ot.ComposedDistribution([ot.Uniform(0.0, 1.0)]*5) >>> bounds = distribution.getRange() >>> lhs = ot.LHSExperiment(distribution, size) >>> lhs.setRandomShift(False) # centered >>> lhs.setAlwaysShuffle(True) # randomized >>> # Generate a design >>> design = lhs.generate() >>> # Plot the design >>> fig = PlotDesign(design, bounds, 10, 10)