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
Probability axes scales #4799
Comments
The scipy dependency is just needed to get the normal ppf and cdf right? (I haven't looked closely at the code). You could probably just write those out in numpy and then scipy wouldn't be needed. |
@mwaskom The current implementation supports any fully spec'd continuous distribution in |
Maybe I'm missing something, but to use a non-default distribution, the user needs to have scipy installed (or really any library that offers RV objects with a certain interface), but matplotlib itself won't depend on scipy. Right? |
That's a fair point -- we'd only need to reimplement the default case, if the use wants to pass an API-compliant custom distribution, from scipy or not, that's on them. |
@tacaswell I've got a sans-scipy probability scale working. Interested or should I just close this? |
Interested, but maybe it should live in it's own repo in the matplotlib organization. That would (annoyingly) mean you could use scipy. |
OK -- I'll throw it up in its own repo under my name for now. If Matplotlib The Organization ™️ wants to own it, y'all can have it. Closing this for now. (to be clear, what I have doesn't require scipy at all) |
I've got a fairly general and battle-tested probability scale implemented here:
https://github.com/Geosyntec/wqio/blob/master/wqio/utils/probscale.py
I think it'd be a generally useful addition to the matplotlib ecosystem. I say ecosystem because it depends on scipy and matplotlib has a policy of not depending on scipy.
I see a few possible paths:
try/expcept ImportError
around it, and declare scipy an "optional dependency" from now on (unlikely)Option 1
Pro: we release it whenever, libraries supporting old versions of MPL can use it right away
Con: it seems like a lot of overhead for something so small.
Option 2
Pro: Once it's in, it's in and people have it
Con: I don't want to open the floodgates of optional dependencies.
Option 3
Pro: those libraries are pretty agile and will be able to adapt/tweak to suit their needs
Con: I think probability scales are generally useful and shouldn't have to be re-implemented in every mpl-based module that might want them (especially in libs like stats-models).
Any thoughts?
Attn: @tacaswell @mwaskom @glamp
The text was updated successfully, but these errors were encountered: