.. 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_data_analysis_statistical_hypothesis_testing_plot_henry_line_graph.py: Normal fitting test using the Henry line ======================================== In this example we are going to perform a visual goodness-of-fit test for an univariate normal distribution using the Henry line test, which is the QQ plot adapted for Gaussian distirbutions. .. 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 data .. code-block:: default ot.RandomGenerator.SetSeed(0) distribution = ot.Normal(2.0, 0.5) sample1 = distribution.getSample(100) Draw Henry line plot (good) .. code-block:: default graph = ot.VisualTest_DrawHenryLine(sample1) view = viewer.View(graph) .. image:: /auto_data_analysis/statistical_hypothesis_testing/images/sphx_glr_plot_henry_line_graph_001.png :alt: Henry plot :class: sphx-glr-single-img Draw Henry line plot for a Beta (bad) .. code-block:: default sample2 = ot.Beta(0.7, 0.9, 0.0, 2.0).getSample(100) graph = ot.VisualTest_DrawHenryLine(sample2) view = viewer.View(graph) plt.show() .. image:: /auto_data_analysis/statistical_hypothesis_testing/images/sphx_glr_plot_henry_line_graph_002.png :alt: Henry plot :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.156 seconds) .. _sphx_glr_download_auto_data_analysis_statistical_hypothesis_testing_plot_henry_line_graph.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_henry_line_graph.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_henry_line_graph.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_