Skip to main content

Matprops

matprops is a Python library for visualizing proportional data. It is build above matplotlib (the visualization library). Understanding proportional data is quite easy but when it comes to bigger picture we lack of seeing everything

Installation

Binary installers for the latest released version are available at the Python Package Index (PyPI)

# PyPI
pip install matprops

The source code is currently hosted on GitHub

Area proportional chart

Area proportional charts also known as square area proportional charts is a very easy and basic proportional chart to know first in list. matprops provide a lage amount of customization in creating square area proportional charts

# Pandas - DataFrame Support
import pandas as pd

# Matprops
from matprops import props

props is a subclass doing its work for simple proportional charts

# Creating a dataframe with the help of pandas
dataset = pd.DataFrame(
    {
        'Country': ['France', 'Germany', 'United Arab Emirates'], 
        'Men (%)': [60, 80, 30],
        'Capital': ['Paris', 'Berlin', 'Mecca']
    }
)

# Changing the limits
# Limit : 0 -> 1
dataset["Men (%)"] = dataset["Men (%)"]/100

Reducing the limits is mandatory as the matprops is all about proportional charts we need to get the value down to 0 -> 1 range. Ignoring the limits may cause unexpected warnings and errors

Simple square area proportional charts are capable of showing some insights through this data

fig = props.AreaProp(dataset, "Men (%)", labels=True, title="Country", description="Capital")
fig.show()

Output

Try customizing the graph with everything possible

matprops provides fast and reliable data visualizations for proportional data. matprops currently work only for labelled data for which it is found to be more helpful in defining proportions. matprops aims to move more than proportional charts in upcoming versions. We have enough proportional chart libraries around the Python community, but the thing that differs matprops is its creativity and customization. Some rare visualizations are about to be worked on matprops soon

Metadata

Release files for matprops 1.0.4.5

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 matprops 1.0.4.5
File Interpreter ABI Platform
matprops-1.0.4.5-py3-none-any.whl Python 3 none any Details

Release files / matprops-1.0.4.5-py3-none-any.whl

Download URL matprops-1.0.4.5-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1f2c380b742d10228c728139fb2425a20313b97b29c819ca0e35babfa220def
BLAKE2b-256 checksum
How to use checksums
8efb1630dcd30eddf4bc47974aa90f268abd3f9bc27261a6d89238fe0b79505a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

1.0.4.5 This release

1 release file

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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