.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "_auto_examples/add_origin.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_add_origin.py: Add Origin Example ===================================== :func:`sysplot.add_origin` forces the point ``(0, 0)`` to be included in the plot view, even when no data passes through the origin. .. GENERATED FROM PYTHON SOURCE LINES 6-22 .. image-sg:: /_auto_examples/images/sphx_glr_add_origin_001.png :alt: Add Origin Example :srcset: /_auto_examples/images/sphx_glr_add_origin_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt import sysplot as ssp ssp.apply_config() fig, ax = plt.subplots() # makes the origin (0,0) visible in the plot even if no data points are plotted there ssp.add_origin(ax) plt.plot([2, 4], [1, 3]) ax.set(title="Add Origin Example", xlabel="x", ylabel="y") plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.227 seconds) .. _sphx_glr_download__auto_examples_add_origin.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: add_origin.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: add_origin.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: add_origin.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_