我试图将两个子图彼此相邻(而不是彼此相对).我期待看到[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()
Run Code Online (Sandbox Code Playgroud)
此致,
Axel