Matplotlib is hiring a Research Software Engineering Fellow! See discourse for details. Apply by January 3, 2020
向图形添加线条(不带轴)。
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()
以下函数、方法、类和模块的使用如本例所示:
import matplotlib
matplotlib.pyplot.figure
matplotlib.lines
matplotlib.lines.Line2D