【发布时间】:2020-12-03 20:13:29
【问题描述】:
我想在矩阵 (4,2) 中绘制多个图形,并且我希望左侧的图形在其左侧具有标签,而在右侧则相反。此外,当我在 Google Colab 中绘制它们时,这些图都被挤压在一起,所以我想增加它们的大小和它们之间的间距。最后,我希望只有底部的两个图有 x 标签。
谁能给我一些关于使用哪些函数或内部参数的提示?此外,还有一些功能可以让我在浏览器的另一个窗口中看到我的图表,而不是在我的 Colab 代码框或类似的东西下面?
如果您能给我一些提示以避免不必要的代码,我也会很高兴。
这是我的代码,到目前为止:
x = df_clean['SIO2']
fig, axs = plt.subplots(4, 2)
axs[0,0].plot(x, df_clean['AL2O3'], 'bo', markersize=1)
axs[0,1].plot(x, df_clean['MGO'], 'bo', markersize=1)
axs[1,0].plot(x, df_clean['FEOT'], 'bo', markersize=1)
axs[1,1].plot(x, df_clean['CAO'], 'bo', markersize=1)
axs[2,0].plot(x, df_clean['NA2O'], 'bo', markersize=1)
axs[2,1].plot(x, df_clean['K2O'], 'bo', markersize=1)
axs[3,0].plot(x, df_clean['TIO2'], 'bo', markersize=1)
axs[3,1].plot(x, df_clean['P2O5'], 'bo', markersize=1)
plt.suptitle('Harker Diagrams (All data)')
plt.figure(figsize=(60, 45))
这就是我要回来的:
【问题讨论】:
标签: python matplotlib google-colaboratory