[英]global change to the universal default color of plotly #444
您可以開始定義您想要的模板。 然后你應該添加template=template
到你想要應用這些設置的所有地塊:
import plotly.express as px
import plotly.graph_objs as go
# Create the template
# Put this block in the top of your file
template = go.layout.Template(
layout=go.Layout(
paper_bgcolor="#333333",
plot_bgcolor="#333333"
)
)
fig = px.scatter(x=[0, 1, 2, 3, 4], y=[0, 1, 4, 9, 16], template=template)
fig.show()
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.