You are reading an old version of the documentation (v2.1.1). For the latest version see https://matplotlib.org/stable/gallery/pyplots/fig_x.html
matplotlib
Fork me on GitHub


Travis-CI:

Related Topics

This Page

Fig XΒΆ

../../_images/sphx_glr_fig_x_001.png
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()

Total running time of the script: ( 0 minutes 0.001 seconds)

Gallery generated by Sphinx-Gallery