Skip to main content

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()

The resulting chart from the above code

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

splineplot-0.3.1.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

splineplot-0.3.1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

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

Hashes for splineplot-0.3.1.tar.gz
Algorithm Hash digest
SHA256 053aa5087843dd507b06d9a86c1228818adc436e1f4ac52cee5a216065476157
MD5 cea3d7e38bc57c63fb8892fdff7bbfee
BLAKE2b-256 d426a4fe15c034bbf1e923737df7fef55aeb464812a28364e96a1bf72d768b64

See more details on using hashes here.

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

Hashes for splineplot-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8a405fb453120218bdbaec9a7dfc1ca9a26835aca62edfdd86c69121667f01d1
MD5 19e6cbd313779705ec5da6bd641e9c66
BLAKE2b-256 f3653b483c0aa0434ea27d302d4165562095d72eb63dff2ac842185a8c11a0d0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page