You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
Thanks for your work with plotly_express, it is generally easy to use. We've been trying to add a connecting line to a scatter plot and it doesn't seem like there is a setting to do this? There is the ability to add a trendline smoothed over the data, but we were actually just interested in something simpler. This is possible in plotly by specifying the 'mode' = 'lines+markers'. We were able to come up with a work around, although seems like providing access to the mode in the scatter function would be easier.
Work around is:
import plotly_express as px
iris = px.data.iris()
p = px.scatter(iris, x="sepal_width", y="sepal_length")
for i in range(0, len(p['data'])):
p['data'][i]['mode'] = 'lines+markers'
p