.. 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_gallery_lines_bars_and_markers_scatter_star_poly.py:
=================
Scatter Star Poly
=================
Create multiple scatter plots with different
star symbols.
.. image:: /gallery/lines_bars_and_markers/images/sphx_glr_scatter_star_poly_001.png
:alt: scatter star poly
:class: sphx-glr-single-img
.. code-block:: default
import numpy as np
import matplotlib.pyplot as plt
# Fixing random state for reproducibility
np.random.seed(19680801)
x = np.random.rand(10)
y = np.random.rand(10)
z = np.sqrt(x**2 + y**2)
plt.subplot(321)
plt.scatter(x, y, s=80, c=z, marker=">")
plt.subplot(322)
plt.scatter(x, y, s=80, c=z, marker=(5, 0))
verts = np.array([[-1, -1], [1, -1], [1, 1], [-1, -1]])
plt.subplot(323)
plt.scatter(x, y, s=80, c=z, marker=verts)
plt.subplot(324)
plt.scatter(x, y, s=80, c=z, marker=(5, 1))
plt.subplot(325)
plt.scatter(x, y, s=80, c=z, marker='+')
plt.subplot(326)
plt.scatter(x, y, s=80, c=z, marker=(5, 2))
plt.show()
.. _sphx_glr_download_gallery_lines_bars_and_markers_scatter_star_poly.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: scatter_star_poly.py `
.. container:: sphx-glr-download sphx-glr-download-jupyter
:download:`Download Jupyter notebook: scatter_star_poly.ipynb `
.. only:: html
.. rst-class:: sphx-glr-signature
Keywords: matplotlib code example, codex, python plot, pyplot
`Gallery generated by Sphinx-Gallery
`_