Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Simple API for lines+markers in Plotly express #2719

Closed
malmaud opened this issue Aug 21, 2020 · 2 comments · Fixed by #3326
Closed

Feature request: Simple API for lines+markers in Plotly express #2719

malmaud opened this issue Aug 21, 2020 · 2 comments · Fixed by #3326
Milestone

Comments

@malmaud
Copy link
Contributor

malmaud commented Aug 21, 2020

Thanks for the great work on Plotly express!

I think it would be nice to have a concise express function to plot a line chart with markers shown. This can be done now with

fig=express.line(...)
fig.update_traces(mode='markers+lines') 

but that seems quite verbose for a fairly common kind of figure. What about, for example, adding a keyword argument to express.line to specify marker properties?

cf matplotlib, where you can conveniently do this with something like plt.plot(x, y, fmt='.-') to get line plot with markers.

@nicolaskruchten
Copy link
Member

I've also found it annoying to reach for update_traces just to turn markers on! I don't think we'll do something as terse as fmt as shown but we should do something, indeed.

I'm torn between a single markers=True or a more full-blow symbol="column" type option. With the latter, just turning markers on would be symbol=px.Constant(True) or something like that.

@nicolaskruchten
Copy link
Member

I'm torn between a single markers=True or a more full-blow symbol="column" type option.

I implemented both in #3326 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants