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)
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
)
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
)
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)
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
- Syed Ali Mohsin Bukhari - ali.mohsin@ist.edu.pk
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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8df98f9febb58fe1cc3918488d213c3dff08905dd8bcf77a9195773a5ffaaea
|
|
| MD5 |
b15b469f03c4b062a3e8294f76255b24
|
|
| BLAKE2b-256 |
b5962fac8296366a0055f73f54eca157adb4a0a0a897ddbdbcaaa4857d3fc9a6
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6616d12300c07579f6272e59aee55124f0518243fd8cc53e9576f57bb2c510b7
|
|
| MD5 |
a18755fb43eac3cf845d3aac9a802ae8
|
|
| BLAKE2b-256 |
ba8f9d8f2aaf24f94f7b77655179d399b3879de310b779a44a4e5eff4bd840a1
|