#範例4-6:在分割圖形新增圖形(scatte-marker,line) import plotly.graph_objects as go from plotly.subplots import make_subplots #設定分割圖:一列,兩欄 fig = make_subplots(rows=1, cols=2) #在第一列,第一欄顯示bar圖 fig.add_bar(y=[4, 2, 1], row=1, col=1) #新增scatte-marker fig.add_scatter(y=[2, 3, 4], mode="markers",marker=dict(size=20, color="red"), row=1, col=1) #在第一列,第二欄顯示bar圖 fig.add_bar(y=[2, 1, 3], row=1, col=2) #新增line fig.add_scatter(y=[3,2,4],row=1,col=2) #在jupyter執行 #fig.show() #在spider執行 fig.write_html('exp4-6.html', auto_open=True)