.. note::
    :class: sphx-glr-download-link-note

    Click :ref:`here <sphx_glr_download_gallery_pyplots_fig_x.py>` to download the full example code
.. rst-class:: sphx-glr-example-title

.. _sphx_glr_gallery_pyplots_fig_x.py:


=====
Fig X
=====





.. image:: /gallery/pyplots/images/sphx_glr_fig_x_001.png
    :class: sphx-glr-single-img





.. code-block:: python

    import numpy as np
    import matplotlib.pyplot as plt
    import matplotlib.lines as lines


    fig = plt.figure()

    l1 = lines.Line2D([0, 1], [0, 1], transform=fig.transFigure, figure=fig)

    l2 = lines.Line2D([0, 1], [1, 0], transform=fig.transFigure, figure=fig)

    fig.lines.extend([l1, l2])

    plt.show()


.. _sphx_glr_download_gallery_pyplots_fig_x.py:


.. only :: html

 .. container:: sphx-glr-footer
    :class: sphx-glr-footer-example



  .. container:: sphx-glr-download

     :download:`Download Python source code: fig_x.py <fig_x.py>`



  .. container:: sphx-glr-download

     :download:`Download Jupyter notebook: fig_x.ipynb <fig_x.ipynb>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    Keywords: matplotlib code example, codex, python plot, pyplot
    `Gallery generated by Sphinx-Gallery
    <https://sphinx-gallery.readthedocs.io>`_
