.. 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 :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_scatterplot.py: Scatterplot ============== .. GENERATED FROM PYTHON SOURCE LINES 4-24 .. 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:: Python 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=0.5, palette="muted", height=6, data=mpg, ) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.526 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-jupyter :download:`Download Jupyter notebook: demo_scatterplot.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: demo_scatterplot.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: demo_scatterplot.zip `