Skip to content
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

add automatic height scaling and font resize #1863

Merged
merged 2 commits into from
Mar 24, 2024
Merged

add automatic height scaling and font resize #1863

merged 2 commits into from
Mar 24, 2024

Conversation

ir2718
Copy link
Contributor

@ir2718 ir2718 commented Mar 10, 2024

This PR tackles issue #1858. The issue is solved by scaling the font size up to 12 words. Starting from 12 words the words become slightly harder to read, so a slight height update for the figure is done.

Example for 10, 15, and 30 words:

topics_barchart_10
topics_barchart_15
topics_barchart_30

Copy link
Owner

@MaartenGr MaartenGr left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! I have one additional question. What happens when you want to have the compressed version still? It seems that this always forces large barcharts to be made if users have >12 words. However, I can imagine, and I am one of them, that they might prefer to have the original barcharts in some cases. For instance, I like the process of creating a more global perspective and zooming in when necessary.

bertopic/plotting/_barchart.py Outdated Show resolved Hide resolved
@MaartenGr
Copy link
Owner

Awesome, thanks for your work on this! LGTM.

@MaartenGr MaartenGr merged commit cc1c647 into MaartenGr:master Mar 24, 2024
2 checks passed
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.

2 participants