fmus-viz: A Human-Oriented Visualization Library
fmus-viz is a human-oriented visualization library that provides a unified interface across multiple backend visualization engines. It focuses on intuitive API design, smart defaults, and a great developer experience.
Features
- Unified Interface: A single API that works with multiple visualization backends
- Human-Oriented Design: Intuitive and memorable function names and parameters
- Smart Defaults: Sensible defaults that "just work" for most use cases
- Backend Flexibility: Switch between Matplotlib, Plotly, and Seaborn seamlessly
- Method Chaining: Fluent interface for customizing visualizations
- Rich Visualization Types: Basic charts and statistical visualizations
Installation
# Basic installation with minimal dependencies
pip install fmus-viz
# Install with specific backend support
pip install fmus-viz[matplotlib]
pip install fmus-viz[plotly]
# Install with all backends
pip install fmus-viz[all]
Quick Start
import fmus_viz as viz
import pandas as pd
import numpy as np
# Create sample data
data = pd.DataFrame({
'category': ['A', 'B', 'C', 'D', 'E'],
'value': [10, 15, 7, 12, 9]
})
# Basic bar chart
viz.bar(data, x='category', y='value').show()
# Switch to Plotly backend for interactive plots
viz.set_backend('plotly')
viz.line(data, x='category', y='value').title('Category Values').show()
# Method chaining for customization
viz.scatter(data, x='category', y='value')\
.color('blue')\
.title('Scatter Plot Example')\
.xlabel('Categories')\
.ylabel('Values')\
.show()
# Statistical visualizations
grouped_data = pd.DataFrame({
'category': ['A', 'B', 'C'] * 100,
'value': np.random.randn(300) * 10 + 50
})
viz.boxplot(grouped_data, x='category', y='value').show()
# Correlation matrix
corr_data = pd.DataFrame(np.random.rand(50, 4), columns=['a', 'b', 'c', 'd'])
viz.corr(corr_data, annot=True).show()
Available Backends
Matplotlib Backend (Default)
Static visualizations with high-quality output for scientific and publication-ready figures.
import fmus_viz as viz
viz.set_backend('matplotlib')
viz.bar(data, x='category', y='value')
Plotly Backend
Interactive visualizations with dynamic features like zoom, pan, and hover tooltips. Ideal for dashboards and web applications.
import fmus_viz as viz
viz.set_backend('plotly')
viz.scatter(data, x='x', y='y', title='Interactive Scatter Plot')
Seaborn Backend
Statistical visualizations with beautiful default styling built on top of Matplotlib.
import fmus_viz as viz
viz.set_backend('seaborn')
viz.boxplot(data, x='category', y='value')
Supported Chart Types
Basic Charts
bar()- Vertical bar chartbarh()- Horizontal bar chartline()- Line chartscatter()- Scatter plothistogram()- Histogrampie()- Pie chartarea()- Area chart
Statistical Charts
boxplot()- Box plot with optional groupingviolin()- Violin plotheatmap()- 2D heatmapcorr()- Correlation matrix heatmapdensity()- Kernel density estimation (1D/2D)regression()- Linear regression with confidence interval
Backend Status
| Backend | Status | Charts |
|---|---|---|
| Matplotlib | ✅ Implemented | All basic + statistical |
| Plotly | ✅ Implemented | All basic + statistical |
| Seaborn | ✅ Implemented | All basic + statistical |
Planned Features
Future releases will include:
- Geospatial: map, choropleth
- Network: graph, tree
- 3D: surface, scatter3d
- Additional Backends: Bokeh, Altair
Examples
The examples/ directory contains scripts demonstrating different features:
# Run verification to test all features
python examples/verify_implementation.py
# Basic charts example
python examples/basic_charts.py
# Plotly interactive features
python examples/plotly_interactive_features.py
# Plotly example
python examples/plotly_example.py
Documentation
Full documentation is available at https://fmus-viz.readthedocs.io.
Testing
The project includes a comprehensive test suite with 180+ tests covering all functionality:
# Run all tests
pytest tests/ -v
# Run specific test modules
pytest tests/test_api/test_statistical.py -v
pytest tests/test_backends/test_matplotlib.py -v
# Run with coverage
pytest tests/ --cov=fmus_viz --cov-report=html
Verification
Run the verification script to test all features:
python examples/verify_implementation.py
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for fmus-viz 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fmus_viz-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for fmus_viz-0.1.0-py3-none-any.whl |
Release files / fmus_viz-0.1.0-py3-none-any.whl
| Download URL | fmus_viz-0.1.0-py3-none-any.whl |
|---|---|
| Size | 42.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
123061b239c931672699f2d31c4734aacefac511b2a84b1fff469f9e34601cf5
|
|
BLAKE2b-256 checksum How to use checksums |
9d47ba60c329f87d6eb7ca9fee3c3989872b31210e4284544f463b7e9f1de086
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.0
|
Security for fmus-viz 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.