Skip to content

Use vlines() and plot(), not stem(), in timeline example. #16475

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

Merged
merged 1 commit into from
Feb 12, 2020

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Feb 11, 2020

It's actually easier (IMO...) to achieve the desired result by
combining vlines() and plot() is actually much easier rather than by
using stem() and then fiddling with the artists.

(The visual result is unchanged.)

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@anntzer anntzer added this to the v3.3.0 milestone Feb 11, 2020
# distinguish even close-by events. In contrast to a usual stem plot, we will
# shift the markers to the baseline for visual emphasis on the one-dimensional
# nature of the time line.
# Next, we'll create a stem plot with some variation in levels as to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't call it "stem plot" then.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, but I couldn't really think of a better name...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO the whole section could be rewritten to better descibe the intention and how we use the matplotlib functions to achieve that. But let's not make perfect the enemy of the good.

# distinguish even close-by events. In contrast to a usual stem plot, we will
# shift the markers to the baseline for visual emphasis on the one-dimensional
# nature of the time line.
# Next, we'll create a stem plot with some variation in levels as to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO the whole section could be rewritten to better descibe the intention and how we use the matplotlib functions to achieve that. But let's not make perfect the enemy of the good.

It's actually easier (IMO...) to achieve the desired result by
combining vlines() and plot() is actually much easier rather than by
using stem() and then fiddling with the artists.

(The visual result is unchanged.)
@timhoffm timhoffm merged commit ae72e62 into matplotlib:master Feb 12, 2020
@anntzer anntzer deleted the timeline branch February 12, 2020 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants