Skip to main content

Mundane plotting done easy.

Project description

plotEZ

Mundane plotting made easy.

plotez is a Python library that simplifies common matplotlib plotting tasks with an intuitive API. Create complex plots with minimal boilerplate code.

Features

  • Simple API: Create complex plots with just a few lines of code
  • Dual-Axis Support: Easy creation of dual y-axis or dual x-axis plots
  • Multi-Panel Layouts: Flexible subplot arrangements with automatic labeling
  • File Integration: Direct plotting from CSV files
  • Extensive Customization: Full control over plot appearance via parameter classes
  • Type Safety: Complete type hints for better IDE support and type checking (PEP 561 compliant)
  • Well Tested: Comprehensive test suite with 85%+ coverage

Installation

From PyPI (once published)

pip install plotez

From Source

git clone https://github.com/syedalimohsinbukhari/plotez.git
cd plotez
pip install -e .

Development Installation

pip install -e ".[dev]"

Quick Start

import numpy as np
from plotez import plot_xy

# Generate data
x = np.linspace(0, 10, 100)
y = np.sin(x)

# Create a plot with automatic labeling
plot_xy(x, y, auto_label=True)

Example1 Plot

Examples

Dual Y-Axis Plot

import numpy as np
from plotez import plot_xyy

x = np.linspace(0, 10, 100)
y1 = np.sin(x)
y2 = np.exp(x / 10)

plot_xyy(
    x, y1, y2,
    x_label='Time',
    y1_label='Sine',
    y2_label='Exponential',
    data_labels=['sin(x)', 'exp(x/10)'],
    plot_title='Dual Y-Axis Example',
    use_twin_x=True
)

Example2 Plot

Multi-Panel Plots

import numpy as np
from plotez import n_plotter

# Create 2×2 grid
x_data = [np.linspace(0, 10, 100) for _ in range(4)]
y_data = [
    np.sin(x_data[0]),
    np.cos(x_data[1]),
    np.tan(x_data[2] / 5),
    x_data[3]**2 / 100
]

fig, axs = n_plotter(
    x_data, y_data,
    n_rows=2, n_cols=2,
    auto_label=True
)

Example3 Plot

Custom Styling

import numpy as np
from plotez import plot_xy
from plotez.backend.utilities import LinePlot

x = np.linspace(0, 10, 100)
y = np.sin(x)

# Create custom line plot parameters
line_params = LinePlot(
    line_style=['-'],
    line_width=[2],
    color=['#FF5733'],
    marker=['o'],
    marker_size=[4]
)

plot_xy(x, y, plot_dictionary=line_params)

Example4 Plot

Development

Running Tests

pytest

With Coverage Report

pytest --cov=src/plotez --cov-report=html

Type Checking

mypy src/plotez

Building Documentation

cd docs
make html

Project Status

  • Type hints are corrected throughout the codebase
  • Test suite implemented (80%+ coverage)
  • Documentation structure created
  • Development tools configured (pytest, mypy, sphinx)
  • PEP 561 compliance (py.typed marker)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License – see LICENSE file for details.

Authors

Links

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

plotez-0.1.0.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

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

plotez-0.1.0-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for plotez-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e5ea3248aa415cce9e48ebbf6add5a55cdd8c32f0ac9260f73969003d0f4ede9
MD5 cdb733d2f2ed2cd088d60ac3c40859ea
BLAKE2b-256 1451a159a3f93315f60538eb22c937391249ded9e1a093cee9cb788a640dd1ea

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for plotez-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 197d5c9961904b4cb64913d907ad11bddc4dfdced1c84d413c408c4bf906767d
MD5 49d869622a8c815e66c1c7cc0ca6c607
BLAKE2b-256 95fa6b0c7ba07ea8e88310ff00744568cb22bfd139f4d55496d9471ebb18d2b4

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