.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "11_demos\python_packages\seaborn\demo_linearRegression.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. .. rst-class:: sphx-glr-example-title .. _sphx_glr_11_demos_python_packages_seaborn_demo_linearRegression.py: Linear regression ==================== .. GENERATED FROM PYTHON SOURCE LINES 4-19 .. image-sg:: /11_demos/python_packages/seaborn/images/sphx_glr_demo_linearRegression_001.png :alt: demo linearRegression :srcset: /11_demos/python_packages/seaborn/images/sphx_glr_demo_linearRegression_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none | .. code-block:: Python import seaborn as sns sns.set_theme() # Load the penguins dataset penguins = sns.load_dataset("penguins") # Plot sepal width as a function of sepal_length across days g = sns.lmplot( data=penguins, x="bill_length_mm", y="bill_depth_mm", hue="species", height=5 ) # Use more informative axis labels than are provided by default g.set_axis_labels("Snoot length (mm)", "Snoot depth (mm)") .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.569 seconds) .. _sphx_glr_download_11_demos_python_packages_seaborn_demo_linearRegression.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: demo_linearRegression.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: demo_linearRegression.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: demo_linearRegression.zip `