Skip to main content

Mundane plotting done easy.

Project description

plotEZ

Mundane plotting made easy.

GitHub Release PyPI - Python Version GitHub-licence GiHub-CodeCoverage GitHub top language GitHub contributors Github Issues GitHub OPEN PRs GitHub CLOSED PRs

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.1.tar.gz (15.5 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.1-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: plotez-0.1.1.tar.gz
  • Upload date:
  • Size: 15.5 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.1.tar.gz
Algorithm Hash digest
SHA256 d8df98f9febb58fe1cc3918488d213c3dff08905dd8bcf77a9195773a5ffaaea
MD5 b15b469f03c4b062a3e8294f76255b24
BLAKE2b-256 b5962fac8296366a0055f73f54eca157adb4a0a0a897ddbdbcaaa4857d3fc9a6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: plotez-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6616d12300c07579f6272e59aee55124f0518243fd8cc53e9576f57bb2c510b7
MD5 a18755fb43eac3cf845d3aac9a802ae8
BLAKE2b-256 ba8f9d8f2aaf24f94f7b77655179d399b3879de310b779a44a4e5eff4bd840a1

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