我可以帮您翻译如下内容:
在JupyterLab中,回车键会使新行出现在图表前面而不是之间:
在JupyterLab中的同一笔记本单元格中,如何在多个图形之间添加空格?需要说明的是,我不是要在子图之间添加空格,而是在图形之间添加空格。
例如,
import matplotlib.pyplot as plt
fig1 = plt.figure()
_ = plt.plot(x,y)
fig2 = plt.figure()
_ = plt.hist(z)
我将会有两个“附加”的数字,我希望在它们之间添加空格,就像 print('\n')
在输出之间添加空格一样。
为了进一步澄清,使用:
import matplotlib.pyplot as plt
fig1 = plt.figure()
_ = plt.plot([1, 2], [2, 3])
print('\n' * 4)
fig2 = plt.figure()
_ = plt.hist([1, 2, 3])
在JupyterLab中,回车键会使新行出现在图表前面而不是之间:
plt.tight_layout()
。https://matplotlib.org/3.3.3/tutorials/intermediate/tight_layout_guide.html#sphx-glr-tutorials-intermediate-tight-layout-guide-py - rzaratx