【发布时间】:2010-12-09 15:23:06
【问题描述】:
我正在尝试将两个子图彼此相邻放置(而不是在彼此下方)。我期待看到 [sp1] [sp2]
相反,只会显示第二个图 [sp2]。
from matplotlib import pyplot
x = [0, 1, 2]
pyplot.figure()
# sp1
pyplot.subplot(211)
pyplot.bar(x, x)
# sp2
pyplot.subplot(221)
pyplot.plot(x, x)
pyplot.show()
【问题讨论】:
标签: python matplotlib