has2k1 / mizani

A scales package for python
https://mizani.readthedocs.io
BSD 3-Clause "New" or "Revised" License
49 stars 14 forks source link

add squish #10

Closed stillmatic closed 6 years ago

stillmatic commented 6 years ago

behavior is similar to scales but without a finite_only parameter.

follow up to https://github.com/has2k1/plotnine/issues/126

has2k1 commented 6 years ago

Can you add the only_finite option, I think this should do.

finite = np.isfinite(x) if only_finite else True

x[(x < range[0]) & finite] = range[0]
x[(x > range[1]) & finite] = range[1]
stillmatic commented 6 years ago

ok, added the parameter, please take a look!

has2k1 commented 6 years ago

Great. Thank you.

has2k1 commented 6 years ago

Released in v0.4.6