1 回答

TA貢獻(xiàn)1921條經(jīng)驗(yàn) 獲得超9個(gè)贊
使用幾個(gè)屬性的正確組合應(yīng)該可以幫助您實(shí)現(xiàn)這一目標(biāo):
marker_symbol='circle'
marker_color = 'white'
marker = dict(line = dict(color='green', width = 2))
陰謀
完整代碼:
import plotly.graph_objects as go
import numpy as np
x = np.arange(10)
fig = go.Figure()
fig.add_trace(
go.Scatter(
x=x, y=x**2,
mode='lines+markers',
line=dict(color='green'),
marker_size=16,
marker_symbol='circle',
name = 'no line through this',
showlegend = True,
marker_color = 'white',
marker = dict(line = dict(color='green', width = 2))
)
)
fig.update_layout(
plot_bgcolor='white'
)
fig.show()
添加回答
舉報(bào)