Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[MRG+1] EXA Fixing plots for Out-of-core classification of text documents example #12359

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 2 commits into from
Oct 13, 2018

Conversation

xhluca
Copy link
Contributor

@xhluca xhluca commented Oct 11, 2018

Reference Issues/PRs

What does this implement/fix? Explain your changes.

The current Out-of-core classification of text documents generates figures with overlapping and cropped label names. This fixes the problem by adjusting the layout (using plt.tight_layout) for figure 3 and 4 and rotating the label for figure 3.

Here are the current images:

Here are the new generated images:

figure 3
figure 4

Any other comments?

@xhluca
Copy link
Contributor Author

xhluca commented Oct 11, 2018

@qinhanmin2014 I mentioned this in this issue: #12224

@xhluca xhluca changed the title Rotate figure 3, tight layout [WIP] Fixing plots for Out-of-core classification of text documents example Oct 12, 2018
@qinhanmin2014
Copy link
Member

Thanks, why WIP?
Will it be better to put labels on x-axis in the middle of each bar?

@xhluca
Copy link
Contributor Author

xhluca commented Oct 12, 2018

That's right, labels on the middle would probably look better. I'll try it out and compare both tomorrow. Once it's done, I'll change the title to MRG if there isn't anything else that should be updated.

@xhluca
Copy link
Contributor Author

xhluca commented Oct 12, 2018

Thoughts on centered axis? Will commit if it looks better:
fig1
fig2

I personally think they look nicer, but I think the original author had reasons to not center it so will look more into it

@qinhanmin2014
Copy link
Member

At least you'll have +1 from me if you center the labels :)

@xhluca
Copy link
Contributor Author

xhluca commented Oct 12, 2018

Sounds good 😄

Copy link
Member

@qinhanmin2014 qinhanmin2014 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @xhlulu

@qinhanmin2014 qinhanmin2014 changed the title [WIP] Fixing plots for Out-of-core classification of text documents example [MRG+1] EXA Fixing plots for Out-of-core classification of text documents example Oct 13, 2018
Copy link
Member

@rth rth left a comment

Choose a reason for hiding this comment

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

Generally I'm not convinced we should use tight_layout everywhere, but the labels rotation is a clear improvement. LGTM, thanks @xhlulu !

@rth rth merged commit c76dc05 into scikit-learn:master Oct 13, 2018
@xhluca
Copy link
Contributor Author

xhluca commented Oct 13, 2018

Thank you all!

jnothman pushed a commit to jnothman/scikit-learn that referenced this pull request Oct 15, 2018
anuragkapale pushed a commit to anuragkapale/scikit-learn that referenced this pull request Oct 23, 2018
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
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