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

Unexpected results from litstudy.plot_author_histogram() #72

Closed
larsgrobe opened this issue Jan 3, 2024 · 2 comments
Closed

Unexpected results from litstudy.plot_author_histogram() #72

larsgrobe opened this issue Jan 3, 2024 · 2 comments

Comments

@larsgrobe
Copy link
Contributor

larsgrobe commented Jan 3, 2024

Dear all,

I am observing some unexpected behavior in litstudy.plot_author_histogram() in the current master branch. I tried loading bibtex files from Web of Sciences and Scopus, as well as a Scopus csv. In all cases, I get not only a histogram showing the publication counts per author, but I get two histograms (here one blue, one orange), that I can stack. Apparently I have two categories here, but I cannot make sense of this and did not find anything mentioned in the documentation.

Best, Lars.

@stijnh
Copy link
Member

stijnh commented Jan 4, 2024

Thanks for using litstudy and thanks for reporting this issue!

If you do not provide the groups= keywords, then it should only draw a single histogram in one color. Make sure to clear the matplotlib canvas between different calls to plot_... since otherwise the graphs will be drawn onto the same figure.

Do you have an image of the problem and maybe a relevant code snippet?

@larsgrobe
Copy link
Contributor Author

Thank you - indeed adding a simple plt.clf() after calling plt.savefig() or plt.show() solved this.

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

No branches or pull requests

2 participants