.. _sphx_glr_gallery_lines_bars_and_markers_scatter_symbol.py: ============== Scatter Symbol ============== .. image:: /gallery/lines_bars_and_markers/images/sphx_glr_scatter_symbol_001.png :align: center .. code-block:: python from matplotlib import pyplot as plt import numpy as np import matplotlib # Fixing random state for reproducibility np.random.seed(19680801) x = np.arange(0.0, 50.0, 2.0) y = x ** 1.3 + np.random.rand(*x.shape) * 30.0 s = np.random.rand(*x.shape) * 800 + 500 plt.scatter(x, y, s, c="g", alpha=0.5, marker=r'$\clubsuit$', label="Luck") plt.xlabel("Leprechauns") plt.ylabel("Gold") plt.legend(loc=2) plt.show() **Total running time of the script:** ( 0 minutes 0.099 seconds) .. only :: html .. container:: sphx-glr-footer .. container:: sphx-glr-download :download:`Download Python source code: scatter_symbol.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: scatter_symbol.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_