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

kwargs passed to plotpdf function are passed to both hist and line plot #10

Open
SJaffa opened this issue Apr 30, 2021 · 1 comment
Open

Comments

@SJaffa
Copy link

SJaffa commented Apr 30, 2021

I noticed this when trying to plot a legend. I passed label='blah' to the plotpdf() function and then called plt.legend(), and it shows the same label twice for the histogram and the fitted power law.

I also would like to use the density=True option for the histogram to get a PDF rather than frequency on the y-axis, but it gives an error when it tries to pass this to the plt.plot() function to plot the powerlaw fit line.

Could there be some way to pass two separate sets of kwargs? Or catch the error if the kwarg is inappropriate for one of the plot types and try again without that kwarg?

Thanks.

@keflavich
Copy link
Owner

Yes, this is probably not too hard - if you want to dig in the source code and fix it yourself, I'd welcome a PR, otherwise I'll try to have a look when I can

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