.. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_probabilistic_modeling_distributions_plot_maximum_distribution.py: Create a maximum distribution ============================= In this example we are going to build the distribution of the maximum of independent distributions. .. code-block:: default from __future__ import print_function import openturns as ot import openturns.viewer as viewer from matplotlib import pylab as plt ot.Log.Show(ot.Log.NONE) create a collection of distribution .. code-block:: default distribution1 = ot.Normal() distribution2 = ot.Uniform(-1.0, 2.0) distColl = [distribution1, distribution2] create the distribution .. code-block:: default distribution = ot.MaximumDistribution(distColl) print(distribution) .. rst-class:: sphx-glr-script-out Out: .. code-block:: none MaximumDistribution(ComposedDistribution(Normal(mu = 0, sigma = 1), Uniform(a = -1, b = 2), IndependentCopula(dimension = 2))) draw PDF .. code-block:: default graph = distribution.drawPDF() view = viewer.View(graph) plt.show() .. image:: /auto_probabilistic_modeling/distributions/images/sphx_glr_plot_maximum_distribution_001.png :alt: plot maximum distribution :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.070 seconds) .. _sphx_glr_download_auto_probabilistic_modeling_distributions_plot_maximum_distribution.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_maximum_distribution.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_maximum_distribution.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_