Python 交互式数据可视化plotly
Python 交互式数据可视化plotly
·
import plotly.graph_objects as go
# 创建数据
x = [1, 2, 3, 4, 5]
y = [1, 3, 2, 4, 5]
# 创建图表
fig = go.Figure(data=go.Scatter(x=x, y=y))
# 设置图表布局
fig.update_layout(title='折线图', xaxis_title='X轴', yaxis_title='Y轴')
# 显示图表
fig.show()
更多推荐
所有评论(0)