.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "intro/matplotlib/auto_examples/options/plot_markers.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_intro_matplotlib_auto_examples_options_plot_markers.py: Markers ======= Show the different markers of matplotlib. .. GENERATED FROM PYTHON SOURCE LINES 7-39 .. image-sg:: /intro/matplotlib/auto_examples/options/images/sphx_glr_plot_markers_001.png :alt: plot markers :srcset: /intro/matplotlib/auto_examples/options/images/sphx_glr_plot_markers_001.png :class: sphx-glr-single-img .. code-block:: default import numpy as np import matplotlib.pyplot as plt def marker(m, i): X = i * .5 * np.ones(11) Y = np.arange(11) plt.plot(X, Y, lw=1, marker=m, ms=10, mfc=(.75, .75, 1, 1), mec=(0, 0, 1, 1)) plt.text(.5 * i, 10.25, repr(m), rotation=90, fontsize=15, va='bottom') markers = [0, 1, 2, 3, 4, 5, 6, 7, 'o', 'h', '_', '1', '2', '3', '4', '8', 'p', '^', 'v', '<', '>', '|', 'd', ',', '+', 's', '*', '|', 'x', 'D', 'H', '.'] n_markers = len(markers) size = 20 * n_markers, 300 dpi = 72.0 figsize= size[0] / float(dpi), size[1] / float(dpi) fig = plt.figure(figsize=figsize, dpi=dpi) plt.axes([0, 0.01, 1, .9], frameon=False) for i, m in enumerate(markers): marker(m, i) plt.xlim(-.2, .2 + .5 * n_markers) plt.xticks([]) plt.yticks([]) plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.053 seconds) .. _sphx_glr_download_intro_matplotlib_auto_examples_options_plot_markers.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_markers.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_markers.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_