-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Stem speedup2 #12380
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
Stem speedup2 #12380
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
2098d1a
Improve step performance
dstansby cdaadb8
Update pyplot
dstansby 00de51b
Fix doc tilde
dstansby be0dc01
...Fix warnings.warn->cbook._warn_external
jklymak a986013
ahem... spelling of _warn_external
jklymak da04fa3
Fix docstring quotes
timhoffm 0bef714
Docstring double quotes
dstansby 6b19ba6
Small doc change + use zip
dstansby 1f7228d
Remove code duplication
dstansby 6d6c786
Fix missing indentation
dstansby 9aa02ec
Update _axes.py
jklymak 7828b9c
clarified comment
jklymak 2e98633
Trailing whitespace
jklymak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
`StemContainer` now stores `LineCollection` | ||
------------------------------------------- | ||
|
||
`StemContainer` objects can now store a `LineCollection` object instead of a | ||
list of `Line2D` objects for stem lines plotted using `ax.stem`. This gives a | ||
very large performance boost to displaying and moving `ax.stem` plots. | ||
|
||
This will become the default behaviour in Matplotlib 3.3. To use it now, the | ||
``use_line_collection`` keyword argument to ~`.axes.stem` can be set to | ||
``True``. | ||
|
||
Individual line segments can be extracted from the `LineCollection` using | ||
`LineCollection.get_segements()`. See the `LineCollection` documentation for | ||
other methods to retrieve the collection properties. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Perhaps this may just as well use check_figures_equal to check that the result is the same regardless of
use_line_collection
, and avoid an additional baseline image?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 don't think
ax.stem
had an image test before I added this one here, so I think it's maybe worth leaving in.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.
Even then I'd rather check equivalency with e.g. manually creating the stem plot with individual calls to plot(), but it's just my preference.
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 it is worth having a visual test here, because it helps a lot when trying to figure out problems (especially with the legend)