-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add marker-only and line+marker visuals to the plot() plot types #27771
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
Conversation
This shows as See also the built docs |
Inspired from the discussion in matplotlib#27765: We should visually communicate that `plot()` covers all three variants: markers only, line+markers, line-only. They are visually distinct enough that it's not possible to infer the variants if you see only one. In particular, it's important to communicate that you can draw markers only. We don't want to automatically drive people who want markers (e.g. some discrete measurements of a dependent variable y (x)) to scatter because that's the only one showing discrete markers in the overview.
1d3b18c
to
2a59cb2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think worth adding fmt=
to be clear on what those arguments are doing, but feel free to take or leave that suggestion.
|
||
# plot | ||
fig, ax = plt.subplots() | ||
|
||
ax.plot(x2, y2 + 2.5, 'x', markeredgewidth=2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ax.plot(x2, y2 + 2.5, 'x', markeredgewidth=2) | |
ax.plot(x2, y2 + 2.5, fmt='x', markeredgewidth=2) |
ax.plot(x, y, linewidth=2.0) | ||
ax.plot(x2, y2 - 2.5, 'o-', linewidth=2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ax.plot(x2, y2 - 2.5, 'o-', linewidth=2) | |
ax.plot(x2, y2 - 2.5, fmt='o-', linewidth=2) |
@dstansby passing |
Inspired from the discussion in #27765: We should visually communicate that
plot()
covers all three variants: markers only, line+markers, line-only. They are visually distinct enough that it's not possible to infer the variants if you see only one.In particular, it's important to communicate that you can draw markers only. We don't want to automatically drive people who want markers (e.g. some discrete measurements of a dependent variable y (x)) to scatter because that's the only one showing discrete markers in the overview.