Skip to main content

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

boplotkit-0.1.3.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

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

boplotkit-0.1.3-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

File details

Details for the file boplotkit-0.1.3.tar.gz.

File metadata

  • Download URL: boplotkit-0.1.3.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for boplotkit-0.1.3.tar.gz
Algorithm Hash digest
SHA256 4d2c4a4887461719daa140112ad7ae09bd76bb84ffd6c3af1ba3d843515a7337
MD5 eef3a4f825ea527cebf5dbb0400799c4
BLAKE2b-256 baaa392e0c49be519239c12cd01a99ea0f799f96302364f4afc906d99a22c3f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for boplotkit-0.1.3.tar.gz:

Publisher: publish.yml on bo-qian/BoPlotKit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file boplotkit-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: boplotkit-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 23.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for boplotkit-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f0e3cf747d5388d2b000b6d1eb4cfac379f3cd26f407cdb7ea7c6babfec0836b
MD5 ead5c0e84339be3a90ed0c7670b6a596
BLAKE2b-256 a76f9c3bd43b62ce08c20982e980fc5d5c9c67fe85c29af168f527005d6fa1aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for boplotkit-0.1.3-py3-none-any.whl:

Publisher: publish.yml on bo-qian/BoPlotKit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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