.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/reliability/plot_reliability_models.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code or to run this example in your browser via JupyterLite. .. rst-class:: sphx-glr-example-title .. _sphx_glr_api_gallery_reliability_plot_reliability_models.py: Weibull survival and shape ========================== Compute an inspectable engineering model using SI inputs. See the linked domain guide for assumptions and benchmark checks. .. GENERATED FROM PYTHON SOURCE LINES 8-22 .. image-sg:: /api/gallery/reliability/images/sphx_glr_plot_reliability_models_001.png :alt: plot reliability models :srcset: /api/gallery/reliability/images/sphx_glr_plot_reliability_models_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from engineeringkit.reliability import weibull_reliability t = np.linspace(0, 8, 201) fig, ax = plt.subplots() for beta in [0.5, 1, 2]: ax.plot(t, weibull_reliability(t, 3, beta), label=f"shape beta={beta}") ax.set(xlabel="time [s]", ylabel="survival probability", ylim=(0, 1)) ax.legend() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.075 seconds) .. _sphx_glr_download_api_gallery_reliability_plot_reliability_models.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: lite-badge .. image:: images/jupyterlite_badge_logo.svg :target: ../../../lite/lab/index.html?path=api/gallery/reliability/plot_reliability_models.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_reliability_models.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_reliability_models.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_reliability_models.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_