[英]Plotly.express graph returns None
I want to calculating a stock return daily by it's data frame.我想通过它的数据框每天计算股票收益。 However, the out put of the fig command just show None .但是, fig 命令的输出只显示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())
Edited : My problem above has been solved.编辑:我上面的问题已经解决了。 However, what about the following?然而,下面的呢? Nothing appears.什么都没有出现。
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()
You want to do fig.show()
at the end, not print(fig.show())
你想在最后做fig.show()
,而不是print(fig.show())
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.