Matrix legend layout for matplotlib
Project description
Matrix legend for Matplotlib
A small extension for Matplotlib's Legend to create matrix legends for plots parametrized with the cartesian product of two grids. Consider the following toy example of evaluating different functions with different "frequency" parameter values. Full enumeration of function+parameter pairs gets cumbersome very quickly, but the same information can be naturally presented in a table layout.
Installation
pip install matplotlib-matrix-legend
Usage
The module exports one public function, a drop-in replacement for Axes.legend
method. Since most of the functionality is inherited directly from the original Legend class,
the styling, layout, custom handles and other features should largely work as expected.
from matrix_legend import matrix_legend
fig, ax = plt.subplots()
# your plotting here
# instead of ax.legend(...)
# see https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.legend.html
# for args & kwargs
matrix_legend(ax, ...)
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 matplotlib_matrix_legend-0.0.2.tar.gz.
File metadata
- Download URL: matplotlib_matrix_legend-0.0.2.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
093715ad688fe77cf347fab6653375eb4e4bede5a4d3ff0094dbf4f23a2bf83d
|
|
| MD5 |
b0934760a2f7829d86b03ad84bb1078f
|
|
| BLAKE2b-256 |
3ff5d739b781ea859f34adf305fc945e4c9526bb993a77b654c83fec22a64df9
|
File details
Details for the file matplotlib_matrix_legend-0.0.2-py3-none-any.whl.
File metadata
- Download URL: matplotlib_matrix_legend-0.0.2-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
372597ddb79bcb599ee3a56acaebeaee1d187cceb3966a0e17b264c720d5b5ef
|
|
| MD5 |
6e403405c2c4f81e99d8b6d36e0079a1
|
|
| BLAKE2b-256 |
d92c0f1031fa76c22b5e701dc1fdf0e2434799e91d2335dbca50f1f288b573c9
|