Plotly: How to set line color?

前端 未结 3 1428
时光取名叫无心
时光取名叫无心 2021-02-20 00:30

How can I set the color of a line in plotly?

import plotly.graph_objects as go
from plotly.subplots import make_subplots


fig = make_subplots(rows=         


        
3条回答
  •  情深已故
    2021-02-20 01:15

    fig.add_trace(
                    go.Scatter(
                        x=list(dict_val['yolo_timecost'].keys()),
                        y=signal.savgol_filter(list(dict_val['yolo_timecost'].values()),2653,3),
                        mode='lines',
                        name='YOLOv3实时耗时',
                        line=dict(
                            color='rgb(204, 204, 204)',
                            width=5
                        ),
                        ),
                    )
    

提交回复
热议问题