Skip to main content

The bixplot: A variation on the boxplot suited for bimodal data

Project description

bixplot

bixplot is a visualization designed to detect and display bimodal and multimodal structure in univariate data. It combines density visualization (like violin plots), summary statistics (like boxplot), and individual observations (like rug plot).


Background

The method is based on the research paper:

“The bixplot: A variation on the boxplot suited for bimodal data”

The classical boxplot assumes unimodality and may fail to reveal meaningful subgroups in the data.
The bixplot addresses this by:

  • testing for unimodality
  • if unimodality is rejected, it applies a univariate clustering method that ensures contiguous clusters, meaning that no cluster has members inside another cluster, and such that each cluster contains at least a given number of unique members.
  • visualizing clusters as separate components

Installation

pip install bixplot


Quick example

from bixplot import bixplot import seaborn as sns

df_penguins = sns.load_dataset("penguins") print(df_penguins.shape) display(df_penguins.head(2))

fig, axs = plt.subplots(1,2, figsize=(8, 4)) sns.violinplot(data=df_penguins, x='island', y='bill_length_mm', color=R_orange, linecolor="k", ax=axs[0]) axs[0].set_title("violin plot", fontweight='bold', fontsize=10)

bixplot(data=df_penguins, x='island', y='bill_length_mm', ax=axs[1]) axs[1].set_title("bixplot", fontweight='bold', fontsize=10) plt.tight_layout()


Examples

More examples are available in the examples/ folder.


Data

The data/ folder contains datasets used for demonstrations.

See data/README.md for full attribution and sources.


License

MIT http://opensource.org/licenses/MIT


Author

Your Name

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

bixplot-0.1.0.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bixplot-0.1.0-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file bixplot-0.1.0.tar.gz.

File metadata

  • Download URL: bixplot-0.1.0.tar.gz
  • Upload date:
  • Size: 20.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for bixplot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ebbf217ae7788fd89d3c70dd9e2f2fd20b1e2c7a0acc94c134e4a953eb608ca9
MD5 cb40e7f9e6fa9d18ab20ffa3a10ac79e
BLAKE2b-256 095d4f0a25f6503cfc14897f3a1b9339be6ace1bb4fc9d0965097e45bd3284f6

See more details on using hashes here.

File details

Details for the file bixplot-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: bixplot-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for bixplot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bdf81e7a04861ef569e0183f5ff0efa23656336de1bae3db15a5105db172a1c0
MD5 5752d4c123a78e9db6fb6b70240b2cf0
BLAKE2b-256 5e10a1c983f5fa33470ff824bb590c7db6ea32d18c239aba7a3a13e44cef6d65

See more details on using hashes here.

Supported by

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