Skip to main content

fmus-viz: A Human-Oriented Visualization Library

Python 3.8+ License: MIT

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 chart
  • barh() - Horizontal bar chart
  • line() - Line chart
  • scatter() - Scatter plot
  • histogram() - Histogram
  • pie() - Pie chart
  • area() - Area chart

Statistical Charts

  • boxplot() - Box plot with optional grouping
  • violin() - Violin plot
  • heatmap() - 2D heatmap
  • corr() - Correlation matrix heatmap
  • density() - 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)

Table of built distributions (wheels) for fmus-viz 0.1.0
File Interpreter ABI Platform
fmus_viz-0.1.0-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page