Skip to content

Include use_line_collection argument#14326

Merged
thomasjpfan merged 1 commit intoscikit-learn:masterfrom
jcusick13:fix-mpl-stem-14117
Jul 13, 2019
Merged

Include use_line_collection argument#14326
thomasjpfan merged 1 commit intoscikit-learn:masterfrom
jcusick13:fix-mpl-stem-14117

Conversation

@jcusick13
Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Avoids raising a warning for examples/linear_model/plot_lasso_and_elasticnet.py, as described in #14117.

What does this implement/fix? Explain your changes.

As described by the warning message,

UserWarning: In Matplotlib 3.3 individual lines on a stem plot will be added as a LineCollection instead of individual lines. This significantly improves the performance of a stem plot. To remove this warning and switch to the new behaviour, set the "use_line_collection" keyword argument to True.

the addition of use_line_collection=True to all three plt.stem() plots removed the warning.

Any other comments?

This work is being done at the SciPy2019 sprints.

@amueller
Copy link
Copy Markdown
Member

Thank you, looks good!

@thomasjpfan
Copy link
Copy Markdown
Member

Thank you! @jcusick13

@thomasjpfan thomasjpfan merged commit 9f84658 into scikit-learn:master Jul 13, 2019
@jcusick13 jcusick13 deleted the fix-mpl-stem-14117 branch July 13, 2019 17:20
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 this pull request may close these issues.

3 participants