.. 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_scatterplot.py" .. LINE NUMBERS ARE GIVEN BELOW. .. 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_11_demos_python_packages_seaborn_demo_scatterplot.py: Scatterplot ============== .. GENERATED FROM PYTHON SOURCE LINES 4-14 .. image-sg:: /11_demos/python_packages/seaborn/images/sphx_glr_demo_scatterplot_001.png :alt: demo scatterplot :srcset: /11_demos/python_packages/seaborn/images/sphx_glr_demo_scatterplot_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none | .. code-block:: default import seaborn as sns sns.set_theme(style="white") # Load the example mpg dataset mpg = sns.load_dataset("mpg") # Plot miles per gallon against horsepower with other semantics sns.relplot(x="horsepower", y="mpg", hue="origin", size="weight", sizes=(40, 400), alpha=.5, palette="muted", height=6, data=mpg) .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.752 seconds) .. _sphx_glr_download_11_demos_python_packages_seaborn_demo_scatterplot.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: demo_scatterplot.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: demo_scatterplot.ipynb `