我想用它的数据框来计算每天的股票收益率。但是,fig命令的out put仅显示None
import plotly.express as px
df = px.data.iris()
fig = px.scatter(df, x="sepal_width", y="sepal_length", color="species", marginal_y="violin",
marginal_x="box", trendline="ols", template="simple_white")
print(fig.show())
编辑: 我上面的问题已经解决了。但是,下面呢?什么也没有出现
import plotly.express as px
df = px.data.iris()
fig = px.scatter(df, x="sepal_width", y="sepal_length", color="species", marginal_y="violin", marginal_x="box", trendline="ols", template="simple_white")
fig.show()
您希望在结尾执行
fig.show()
,而不是print(fig.show())
相关问题 更多 >
编程相关推荐