在jupyter中绘图:使用for循环时仅显示最后8个数字

问题描述 投票:0回答:1

我有一个 jupyter 笔记本,我在其中通过 for 循环绘制了几个散点图:

for i in myColumnList:
    for j in myColumnList
        fig = px.scatter(df, x=i, y=j)
        fig.show()

一旦显示超过 8 个人物,较旧的人物开始消失。 我该如何解决这个问题?

plotly==5.16.0
jupyter==1.0.0
jupyter-client==6.1.12
jupyter-console==6.4.2
jupyter-contrib-core==0.4.2
jupyter-server==1.24.0
jupyter_core==5.3.1
jupyterlab_server==2.24.0
python jupyter-notebook plotly jupyter
1个回答
0
投票

您可以使用子图将它们全部绘制在一张图中(您可以将它们垂直堆叠)。只需更改循环中的行号即可。

© www.soinside.com 2019 - 2024. All rights reserved.