No project description provided
Project description
splineplot
A tiny Python package for plotting splines
splineplot
is a tiny Python package that uses statsmodels
to fit
a spline to 1-dimensional data and plot it, along with a scatter plot.
It can be used on its own, or in conjunction with Seaborn; its interface
is similar to that of regplot
.
import seaborn as sns
iris = sns.load_dataset("iris")
g = sns.FacetGrid(
iris,
hue="species",
aspect=1.3,
height=4,
)
g.map(
splineplot,
"sepal_length",
"sepal_width",
alpha=0,
scatter_kws={"s": 3},
)
_ = g.add_legend()
A Note On alpha
The alpha
argument to splineplot
determines the smoothing penalty
used when the spline is fit to the y
data. It's important to consider
overfitting when setting this value; in general a value of 0
with
modest dataset sizes is almost guaranteed to overfit.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file splineplot-0.3.1.tar.gz
.
File metadata
- Download URL: splineplot-0.3.1.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.10.12 Darwin/22.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 053aa5087843dd507b06d9a86c1228818adc436e1f4ac52cee5a216065476157 |
|
MD5 | cea3d7e38bc57c63fb8892fdff7bbfee |
|
BLAKE2b-256 | d426a4fe15c034bbf1e923737df7fef55aeb464812a28364e96a1bf72d768b64 |
File details
Details for the file splineplot-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: splineplot-0.3.1-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.10.12 Darwin/22.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a405fb453120218bdbaec9a7dfc1ca9a26835aca62edfdd86c69121667f01d1 |
|
MD5 | 19e6cbd313779705ec5da6bd641e9c66 |
|
BLAKE2b-256 | f3653b483c0aa0434ea27d302d4165562095d72eb63dff2ac842185a8c11a0d0 |