ipython情节无法创建子图

时间:2016-03-29 18:16:09

标签: ipython plotly

我试图用plotly创建一个子图,但它说工具模块没有一个名为make_subplots的函数,即使它说要做到这一点here。我很困惑。

from plotly import tools        # functions to help build plotly graphs
import plotly.plotly as py      # module that communicates with plotly 
from plotly.graph_objs import *
​
fig = tools.make_subplots(rows=23, cols=2)
fig['layout'].update(height=600, width=600, title='')
​
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-11-b8fb5b790a40> in <module>()
      3 from plotly.graph_objs import *
      4 
----> 5 fig = tools.make_subplots(rows=23, cols=2)
      6 fig['layout'].update(height=600, width=600, title='')

AttributeError: 'module' object has no attribute 'make_subplots'

1 个答案:

答案 0 :(得分:0)

尝试升级您的Plotly版本。