Skip to content

DOC fix deprecation warning raised by KMeans and Matplotlib #24692

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 5 commits into from
Oct 24, 2022

Conversation

glemaitre
Copy link
Member

closes #24685

Adapt code to not raise deprecation warning issue by matplotlib and KMeans

@glemaitre glemaitre changed the title DOC fix deprecation warning KMeans and Matplotlib DOC fix deprecation warning raised by KMeans and Matplotlib Oct 18, 2022
@betatim
Copy link
Member

betatim commented Oct 18, 2022

The plots are now too close together so that the axis labels get cut off. Not quite sure what the replacement for ax.dist =12 is though :-/

@glemaitre
Copy link
Member Author

I would try to use plt.adjust_subplots

@glemaitre
Copy link
Member Author

I also needed to create a single figure to have all the axes on it. But it should do the trick or at least it should be easy to setup.

Copy link
Member

@betatim betatim left a comment

Choose a reason for hiding this comment

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

LGTM.

Do you know why the ax.set_position() isn't needed anymore/removing it didn't seem to change anything?

Co-authored-by: Tim Head <betatim@gmail.com>
@glemaitre
Copy link
Member Author

Do you know why the ax.set_position() isn't needed anymore/removing it didn't seem to change anything?

Yep until the plot is fine, I am also fine removing line of code :)

@Kshitij68
Copy link
Contributor

Plots look good too now !

@haiatn
Copy link
Contributor

haiatn commented Oct 21, 2022

Can this be merged?

@glemaitre glemaitre merged commit 8c384da into scikit-learn:main Oct 24, 2022
glemaitre added a commit to glemaitre/scikit-learn that referenced this pull request Oct 31, 2022
andportnoy pushed a commit to andportnoy/scikit-learn that referenced this pull request Nov 5, 2022
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.

Example of code that needs to be updated
4 participants