【发布时间】:2019-11-12 16:34:28
【问题描述】:
我想知道是否可以将 index 的名称从 matplot 导入 plotly,如下所示:
Matplot 栏:
fig = plt.figure(figsize = (10, 5))
ax = fig.add_subplot(111)
pd.Series([10, 20, 30, 40, 50], index =['a', 'b', 'c', 'd', 'e']).plot.bar(ax = ax)
将 Matplot Bar 转换为 Plotly:
fig = plt.figure(figsize = (10, 5))
ax = fig.add_subplot(111)
pd.Series([10, 20, 30, 40, 50], index =['a', 'b', 'c', 'd', 'e']).plot.bar(ax = ax)
py.iplot_mpl(fig)
【问题讨论】:
标签: python python-3.x pandas matplotlib plotly