【发布时间】:2020-01-07 14:25:57
【问题描述】:
我正在尝试使用 Plotly 对过去一年的 Apple 股票回报率进行 Displot。
import plotly.figure_factory as ff
hist_data = [df['Return'][1:]]
group_labels = ['Apple Return distplot']
fig = ff.create_distplot(hist_data, group_labels, bin_size=.1)
fig.show()
我收到以下错误消息:
AttributeError: 'Figure' 对象没有属性 'show'
我该如何解决上述问题?
【问题讨论】:
-
您使用的是哪个版本的
plotly?你能告诉我们print(plotly.__file__)的输出吗? -
@JohnGordon 我收到了这条消息:
/Users/jacquelinewong/anaconda3/lib/python3.6/site-packages/plotly/__init__.py -
他们已经彻底摧毁了阴谋。没有什么对我有用。
标签: python matplotlib plotly data-visualization