Python 为iplot方程添加轴标题
如何为iplot方程添加图形标题、x轴和y轴标题Python 为iplot方程添加轴标题,python,plotly,jupyter,Python,Plotly,Jupyter,如何为iplot方程添加图形标题、x轴和y轴标题 from plotly.offline import init_notebook_mode, iplot import numpy as np init_notebook_mode() x = np.linspace(-5,20) iplot([{'x': x, 'y': 4-0.325/(1+14/x)**3}]) 以下是一个例子: layout = go.Layout( title="Title", x
from plotly.offline import init_notebook_mode, iplot
import numpy as np
init_notebook_mode()
x = np.linspace(-5,20)
iplot([{'x': x, 'y': 4-0.325/(1+14/x)**3}])
以下是一个例子:
layout = go.Layout(
title="Title",
xaxis=dict(
title="X Label"
),
yaxis=dict(
title="Y label"
)
)
x = np.linspace(-5,20)
iplot({'data': [{'x': x, 'y': 4-0.325/(1+14/x)**3}], 'layout': layout})