.. 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_examples_plot_plot_discrete_scatter.py: Discrete Scatter Example ========================================== .. image:: /auto_examples/plot/images/sphx_glr_plot_discrete_scatter_001.png :alt: plot discrete scatter :class: sphx-glr-single-img .. code-block:: default import matplotlib.pyplot as plt from dabl.datasets import load_ames from dabl.plot import discrete_scatter data = load_ames() # Scatter plot for year built and house price grouped by category of quality. discrete_scatter( x=data["Year Built"], y=data["SalePrice"], c=data["Overall Qual"], unique_c=[2, 4, 6, 8, 10], legend=True, alpha=0.3 ) plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.181 seconds) .. _sphx_glr_download_auto_examples_plot_plot_discrete_scatter.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_discrete_scatter.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_discrete_scatter.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_