标题有轴向标题,还有整幅图的标题,也有图例的标题
画图的时候可以直接指定 画中所有的字体 所有的颜色 等,但单个指定的优先级是最高的
import plotly.graph_objects as go
fig = go.Figure()
fig.add_trace(go.Scatter(
x=[0, 1, 2, 3, 4, 5, 6, 7, 8],
y=[0, 1, 2, 3, 4, 5, 6, 7, 8],
name="Name of Trace 1"
))
fig.add_trace(go.Scatter(
x=[0, 1, 2, 3, 4, 5, 6, 7, 8],
y=[1, 0, 3, 2, 5, 4, 7, 6, 8],
name="Name of Trace 2"
))
fig.update_layout(
title="Plot Title", # 标题文本 不设置位置的话 默认在左上角,下面有设置位置和颜色的讲解
xaxis_title="X Axis Title", # X轴标题文本
yaxis_title="X Axis Title", # Y轴标题文本
legend_title="Legend Title", #