use*_*827 10 python matplotlib
fig, ax = plt.subplots(3, 3, sharex='col', squeeze=False, figsize=(20, 10))
Run Code Online (Sandbox Code Playgroud)
我想绘制7个子图并使用上面的命令.然而,它创建了9个图(包括2个空图).我怎样才能确保只绘制了7个地块?
import matplotlib.pyplot as plt
fig, axs = plt.subplots(3,3)
fig.delaxes(axs[-1, -1])
fig.delaxes(axs[-1, -2])
plt.show()
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
196 次 |
| 最近记录: |