😽

[個人メモ] Plotly 小技 事例

2021/03/14に公開

グラフのカラーパレットをカスタマイズ

import plotly.io as pio

# naming a layout theme for future reference
pio.templates["google"] = go.layout.Template(
    layout_colorway=['#4285F4', '#DB4437', '#F4B400', '#0F9D58',
                     '#185ABC', '#B31412', '#EA8600', '#137333',
                     '#d2e3fc', '#ceead6']
)

# setting Google color palette as default
pio.templates.default = "google"

Changing default color palette in Plotly Go? Python, Sunburst - Graphing Library / Plotly.py - Plotly Community Forum

Discussion