.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "_auto_examples/plot_stem.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__auto_examples_plot_stem.py: Plot Stem ===================================== :func:`sysplot.plot_stem` is a styled wrapper around ``Axes.stem``. It applies the active style cycle automatically and supports two key options: - ``directional_markers=True`` flips the marker direction for stems below the baseline (e.g., ``^`` above, ``v`` below). - ``show_baseline=False`` hides the horizontal baseline. .. GENERATED FROM PYTHON SOURCE LINES 11-36 .. image-sg:: /_auto_examples/images/sphx_glr_plot_stem_001.png :alt: default, directional_markers=True, show_baseline=False :srcset: /_auto_examples/images/sphx_glr_plot_stem_001.png :class: sphx-glr-single-img .. code-block:: Python import numpy as np import matplotlib.pyplot as plt import sysplot as ssp ssp.apply_config() n = np.arange(-8, 9) y = np.sinc(n / 4) fig, axes = plt.subplots(1, 3, figsize=ssp.get_figsize(ncols=3)) # Default: round markers, baseline shown ssp.plot_stem(n, y, ax=axes[0]) axes[0].set(title="default", xlabel="n", ylabel="y[n]") # Outward-pointing triangular markers ssp.plot_stem(n, y, ax=axes[1], marker="^", directional_markers=True) axes[1].set(title="directional_markers=True", xlabel="n") # No baseline ssp.plot_stem(n, y, ax=axes[2], show_baseline=False) axes[2].set(title="show_baseline=False", xlabel="n") plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.514 seconds) .. _sphx_glr_download__auto_examples_plot_stem.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_stem.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_stem.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_stem.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_