A lightweight, zero-effort wrapper around Matplotlib and Pandas for quick data visualization.
Project description
Zez: The Zero-Effort Visualization Kit for Python
Zez (pronounced "Zez") is a lightweight, zero-effort wrapper around Matplotlib and Pandas, designed to make generating common, high-quality data visualizations quick and painless. If you need a standard Bar, Pie, Line, Scatter, or Histogram instantly, Zez handles all the setup, labeling, and basic formatting for you.
🚀 Key Features
- Zero Boilerplate: Quickly generate common charts with minimal code.
- Built on Standards: Leveraging the power and flexibility of Matplotlib.
- Clean Defaults: Provides sensible defaults for titles, labels, colors, and annotations.
- Easy Output: Built-in helper to effortlessly save charts to disk or display them.
💾 Installation
Since this is a custom package, you would typically install it via a Git repository or a private index if it's not on PyPI yet.
Prerequisites
You need Python 3.6+ and the core libraries:
pandasmatplotlibnumpy
Via PyPI (Once published)
pip install zez
How to Import
Use this to import Zez on your code:
import zez
📚 Usage Examples
import zez
chart = zez.chart
chart.Bar(
chart_title='Project Status: Q4 Completion Rate',
alignment='horizontal',
categories_in_order=['Project Alpha', 'Project Beta', 'Project Gamma'],
amounts_in_order=[95, 80, 55],
category_label='Project Name',
amount_label='Completion (%)',
colors_in_order=['green', 'blue', 'orange']
)
# 2. Pie Chart Example: Budget Allocation
# ----------------------------------------------------------------------
chart.Pie(
chart_title='Department Budget Allocation',
amounts_in_order=[45000, 30000, 15000, 10000],
categories_in_order=['Marketing', 'Development', 'Admin', 'Support'],
colors_in_order=['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728'],
split=[0, 0.1, 0, 0], # Explode the Development slice
save_as='budget_pie.png',
show=False
)
# 3. Line Chart Example: Stock Price Trend (Multiple Lines)
# ----------------------------------------------------------------------
x_days = list(range(1, 11))
stock_a = [50, 52, 51, 55, 60, 58, 62, 65, 64, 70]
stock_b = [40, 41, 45, 43, 48, 50, 53, 52, 55, 59]
line_data = [
{'y_data': stock_a, 'line_color': 'green', 'marker_style': 'o'},
{'y_data': stock_b, 'line_color': 'red', 'marker_style': 'x'}
]
chart.Line(
chart_title='Stock Price Comparison Over 10 Days',
x_data=x_days,
y_data_sets=line_data,
data_labels=['Stock A', 'Stock B'],
x_label='Trading Day',
y_label='Price ($)',
)
# 4. Scatter Plot Example: Correlation
# ----------------------------------------------------------------------
x_hours = [1, 2, 3, 4, 5, 6, 7, 8]
y_score = [55, 60, 68, 75, 80, 85, 90, 95]
chart.Scatter(
chart_title='Study Hours vs. Exam Score',
x_data=x_hours,
y_data=y_score,
x_label='Hours Studied',
y_label='Exam Score',
marker_color='purple',
marker_style='D', # Diamond marker
marker_size=150,
save_as='score_correlation.jpg'
)
print("\n--- ZEZ Demonstrations Finished ---")
Project details
Release history Release notifications | RSS feed
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 zez-0.1.1.tar.gz.
File metadata
- Download URL: zez-0.1.1.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d03f5d29afee285a8b9f5a76444199359b11b05066b7e506f52c9b644993806
|
|
| MD5 |
8744e11458e90243bc16cbc92b7984ff
|
|
| BLAKE2b-256 |
c584a3dd90895ab2eb9204473a69404734476cafbaac1ce308ce0fe16b4652b3
|
File details
Details for the file zez-0.1.1-py3-none-any.whl.
File metadata
- Download URL: zez-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6859586563a0c129f9018326b89dcba70779af8cd68d774490eefca0beb89d7e
|
|
| MD5 |
3f831b9b0f9e0a0af1859e4e421a9f08
|
|
| BLAKE2b-256 |
2bdf14ce1dccc2797ca60c99221e4b1e6ed96527962f3bc2a9bdcab06e47bde5
|