通过添加';圆点';或者它的某种标记(Python)

通过添加';圆点';或者它的某种标记(Python),python,plotly,visualization,linegraph,Python,Plotly,Visualization,Linegraph,我有一个数据框df,在其中我创建了一个线图。我想在折线图中用点来固定它 样本数据集: Size Date POD 0.027289 11/1/2020 SJ 0.013563 11/1/2020 SJ 0.058498 11/1/2020 SJ 0.281953 11/1/2020 SJ 0.479725 11/1/2020 SJ 0.007358 11/1/

我有一个数据框df,在其中我创建了一个线图。我想在折线图中用点来固定它

样本数据集:

Size       Date         POD

0.027289      11/1/2020     SJ 
0.013563      11/1/2020     SJ 
0.058498      11/1/2020     SJ 
0.281953      11/1/2020     SJ
0.479725      11/1/2020     SJ 
0.007358      11/1/2020     SJ 
0.075818      11/1/2020     SJ
0.069744      11/1/2020     SJ 
这就是我正在做的

 import plotly.express as px
 import plotly.graph_objects as go
 fig = px.line(df1, x = "Date", y = "Size", color = "POD", title = "POD Growth in US", labels = 
 {"Size": "Size in TB"})
 fig.update_layout(
 font_family="Arial",
 font_color="black",
 title_font_family="Arial",
 title_font_color="black",
 legend_title_font_color="black"
  )
 fig.update_xaxes(title_font_family="Arial")
fig.update_layout(
title={
    'text': "POD Growth in US",
    'y':0.9,
    'x':0.5,
    'xanchor': 'center',
    'yanchor': 'top'})


fig.show()


理想的结果是让点

使用
mode='lines+标记'
。我不确定它是否能像我通常使用的那样与
line
方法和px一起工作

fig = go.Figure()
fig.add_trace(go.Scatter(
    x = df1["Date"], y = df1["Size"], mode='lines+markers'))

是的,维斯特兰。感谢you@Lynnette好的,酷!你可能知道这一点,但不要因为你的问题被标记为重复问题就删除它。不同的用户对搜索的措辞非常不同,因此你的问题可能会像链接中的问题一样对未来的读者有用。