1 回答

TA貢獻1921條經(jīng)驗 獲得超9個贊
使用幾個屬性的正確組合應(yīng)該可以幫助您實現(xiàn)這一目標:
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()
添加回答
舉報