An advanced and flexible scientific plotting toolkit.
Project description
BoPlotKit
BoPlotKit is a modular, extensible scientific plotting toolkit developed for researchers, scientists, and engineers. It provides clean and consistent APIs to generate high-quality, publication-ready figures such as curve plots, particle schematics, and residual analysis.
โจ Features
- Modular Design: Well-organized modules for curves, schematics, styles, utilities, and configuration.
- Unified Aesthetics: Consistent visual themes with predefined colors, markers, and line styles.
- Flexible Curve Plotting: Support for multiple curves, residual comparison, log/scientific scale, truncation, axis customization, and multi-format legends.
- Schematic Plotting: Easily create particle distributions and domain diagrams.
- Smart File Naming: Auto-generated filenames in the format
boplot_<timestamp>_<title>.png. - Minimal Dependencies: Built on top of Matplotlib, NumPy, and Pandas.
- Easy Integration: Can be used as a standalone package or imported into larger Python-based workflows.
- Test-Driven Development: Comes with robust test cases to ensure stability and correctness.
๐ฆ Installation
# Clone the repository
git clone https://github.com/bo-qian/BoPlotKit.git
cd BoPlotKit
# (Optional) Create a virtual environment
python -m venv venv && source venv/bin/activate
# Install the package
pip install .
๐ Quick Example
from boplot import *
# Plot initial schematic of particles
plot_initial_particle_schematic(
coordinates=[[90, 90], [150, 90]],
radii=[30, 30],
domain=[240, 180],
title="Initial Particle Distribution",
show=True,
save=True
)
# Plot multiple curves with residual analysis
plot_curves(
path=["example/data/test_plotkit_multifeature_data.csv"] * 2,
label=["Sim 800K", "Sim 900K"],
x=[0, 0],
y=[3, 4],
xy_label=["Time (s)", "Shrinkage Ratio"],
title_figure="Residual Analysis",
show_residual=True,
save=True,
show=True
)
๐งช Testing
To run all tests:
python -m pytest
All core plotting functions are covered by unit tests under the tests/ directory, including:
- Curve plotting (single and multi-feature)
- Schematic particle distribution
- Residual comparison
- Style and legend configurations
๐ Project Structure
BoPlotKit/
โโโ src/
โ โโโ boplot/
โ โโโ __init__.py
โ โโโ config.py # Global parameters and color sets
โ โโโ curves.py # Core curve plotting functions
โ โโโ schematic.py # Particle schematic functions
โ โโโ style.py # Default plot styling
โ โโโ utils.py # Filename generator and helpers
โโโ tests/ # Pytest-based test cases
โโโ example/ # Example scripts and CSV data
โ โโโ data/
โ โโโ test_example_plot.py
โโโ figures/ # Output figures (auto-generated)
โโโ pyproject.toml # Build configuration
โโโ setup.py # Legacy install config
โโโ LICENSE
โโโ README.md
๐ Dependencies
matplotlib>=3.0
numpy>=1.18
pandas>=1.0
pytest>=6.0
Install via:
pip install -r requirements.txt
๐ Contributing
Feel free to contribute by:
- Reporting issues and bugs
- Improving documentation and examples
- Submitting pull requests with enhancements or new plotting modules
All contributions are welcome and appreciated.
๐ License
GNU General Public License v3 (GPLv3) License ยฉ 2025 Bo Qian
For advanced examples and API documentation, please refer to the tests/ and example/ directories, or explore the docstrings inside the src/boplot/ module.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file boplotkit-0.1.4.tar.gz.
File metadata
- Download URL: boplotkit-0.1.4.tar.gz
- Upload date:
- Size: 23.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8f911e0fa410d753cac5f6260e2b22678af1d4565a0d3c68e74f38f071bbabf
|
|
| MD5 |
f1b5aca1f84d1ddd228c39c0553d3750
|
|
| BLAKE2b-256 |
33ec5333293b6c86ebc642edb50b33e2b3fb4afb3c446bc751467c1783d98ee1
|
Provenance
The following attestation bundles were made for boplotkit-0.1.4.tar.gz:
Publisher:
publish.yml on bo-qian/BoPlotKit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
boplotkit-0.1.4.tar.gz -
Subject digest:
d8f911e0fa410d753cac5f6260e2b22678af1d4565a0d3c68e74f38f071bbabf - Sigstore transparency entry: 251651357
- Sigstore integration time:
-
Permalink:
bo-qian/BoPlotKit@101cecdb98d7e2b935e820dce026ed898168c714 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/bo-qian
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@101cecdb98d7e2b935e820dce026ed898168c714 -
Trigger Event:
push
-
Statement type:
File details
Details for the file boplotkit-0.1.4-py3-none-any.whl.
File metadata
- Download URL: boplotkit-0.1.4-py3-none-any.whl
- Upload date:
- Size: 23.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a55c8de962fae55bf9219b0c6b332b522d9522beebbe0f4e5c9442468a4ce14
|
|
| MD5 |
3af79b5ae2eeca477447c4549aafadd0
|
|
| BLAKE2b-256 |
c36d3bdc0b3af2bc528dfa5908c62b2eddc614b1733bdf3a88ede71b4c1ec905
|
Provenance
The following attestation bundles were made for boplotkit-0.1.4-py3-none-any.whl:
Publisher:
publish.yml on bo-qian/BoPlotKit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
boplotkit-0.1.4-py3-none-any.whl -
Subject digest:
5a55c8de962fae55bf9219b0c6b332b522d9522beebbe0f4e5c9442468a4ce14 - Sigstore transparency entry: 251651360
- Sigstore integration time:
-
Permalink:
bo-qian/BoPlotKit@101cecdb98d7e2b935e820dce026ed898168c714 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/bo-qian
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@101cecdb98d7e2b935e820dce026ed898168c714 -
Trigger Event:
push
-
Statement type: