-
Notifications
You must be signed in to change notification settings - Fork 239
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
Update docstring for hero.wordcloud #102
Comments
Hi @jbesomi @vidyap-xgboost, i'll take this issue. I also like to add an example in the docstring, but i am not sure how to do this with visualizations. Do you have a suggestion how to do this? |
Thank you Sir: assigned! We cannot really add a visual example in the docstring, but it's cool you asked. A very interesting solution that soon or later we might want to implement is to create some visual example with sphinx-gallery. Have a look at the documentation of Sphinx-gallery and see if it make sense. For instance, scikit-learn example is using it for the Examples. We might want to implement that. If you want, I can help you with such task, and apparently also @vidyap-xgboost was interested in contributing :) |
Based on the discussion in #78, it seems like width and height does not have to be the same so long as both of them are at least 400. The first example in #78 has the same width and height (200, 200) but it is still blurry. I think we should rephrase it to: What do you think @vidyap-xgboost @jbesomi? 😃 |
Yup I'm interested in implementing it through sphinx-gallery, I want to help 😄 |
I was going to point this out and a little late here, thanks for bringing it up and I agree to your point! But can you also make sure to test for Thank you! |
@jbesomi @cedricconol According to the
But |
Hi @vidyap-xgboost, I tested >>> import texthero as hero
>>> import pandas as pd
>>> df = pd.read_csv('https://github.com/jbesomi/texthero/raw/master/dataset/bbcsport.csv')
>>> import matplotlib
>>> hero.visualization.wordcloud(df['text'],width = 500, height= 400,background_color='White',min_font_size=1)
>>> matplotlib.pyplot.show(block=True)
>>> hero.visualization.wordcloud(df['text'],width = 1000, height= 800,background_color='White',min_font_size=1)
>>> matplotlib.pyplot.show(block=True) |
Thanks for the suggestion @vidyap-xgboost, this is noted, it seems like black does not format the docstrings. |
Great work @cedricconol ! 👏 👏 |
Hey @vidyap-xgboost @cedricconol! You are doing great, thank you! Apparently black does not format docstring. I guess we will need to do it ourselves (@vidyap-xgboost we might explain this better in the CONTRIBUTING.md, what do you think?). If you want to know more: Black should have an opinion about doc strings (still open issue) |
I agree. Explaining in CONTRIBUTING.md sounds good. Thanks for sharing the link! |
After the discussion on #78
We should add something like:
"To reduce blur in the images, width and height should have the same size, i.e the image should be squared"
The text was updated successfully, but these errors were encountered: