🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

mpl-table

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mpl-table

Create custom table using matplotlib.

0.1.6
PyPI
Maintainers
1

MPL Table

Create a table with row explanations, column headers, using matplotlib. Intended usage was a small table containing a custom heatmap.

Installation

pip install mpl-table

Usage

Example usage can be found within tests/test_create_table.py, the table is created by passing dataframes containing text values, cell colour values, and text colour values. You'll probably want to use bbox_inches="tight" when you fig.savefig.

Example output

Table with row headers:

Example output table.

Table in subplots:

Example output in subplots.

Table with no row headers:

Example output table without row headers.

Table with no row or column headers:

Example output table without row or column headers.

Why

Wanted to be able to create tables containing heatmaps, along with row explanations and different treatment of high/low values for each row. For some rows the formatting of 100% should be considered positive (typically green), whereas others it should be considered negative (typically red).

TODO

Simplify creating a table without any row-headers.

Consider makign the spacing for rows/cols dynamic, based on figsize might work.

Usage within subplots, wasn't required for what was needed, but there could be some use in having subplots with these tables.

Different styles - might want to have the header row / row information column without any background colour, or similar stylings. Shouldn't be hard to do from what's here, just hasn't been done.

Keywords

matplotlib

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts