Lint Python visualizations for common misleading patterns.
Project description
vizlint
Lint Python charts for common misleading or low-quality patterns.
Install
pip install vizlint
pip install "vizlint[mpl]"
Quickstart (Matplotlib)
import matplotlib.pyplot as plt
import vizlint as vl
fig, ax = plt.subplots()
ax.bar(["A", "B"], [101, 103])
ax.set_ylim(100, 104)
report = vl.lint(fig)
print(report.summary())
Example output
For the truncated bar chart above, report.summary() might look like:
vizlint report:
- WARN [bar_zero_baseline] Bar chart y-axis does not include zero, which can exaggerate differences between bars. Hint: Consider starting the y-axis at zero or switch charts if you need to zoom in.
Depending on your chart, you might also see warnings such as axis_labels_missing or axis_range_overexpanded alongside other issues.
Current checks
bar_zero_baseline(warning): Flags bar charts whose y-axis range does not include zero, which can exaggerate differences between bars.axis_labels_missing(warning): Warns when the x-axis, y-axis, or both are unlabeled, making the chart harder to interpret.axis_range_overexpanded(warning): Warns when the y-axis span is far larger than the data range and the data floats in the middle, which can visually minimize changes.
CLI
vizlint path/to/script_that_makes_plots.py
By default the CLI uses matplotlib's Agg backend so it runs cleanly in headless CI. If you want to silence specific checks without editing code, pass --disable with the rule's function name:
vizlint my_script.py --disable axis_labels_missing --disable bar_zero_baseline
Project details
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 vizlint-0.2.0.tar.gz.
File metadata
- Download URL: vizlint-0.2.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d49d73d7a9ed7128c51bb61da48d135b39dbb5c8c829e08dcd6bd2f9c4246e4e
|
|
| MD5 |
b2f52a1a89b3773f1b08589220a61405
|
|
| BLAKE2b-256 |
97474a7003827b3a17a8adbcc2a03627cc02b9cf275ae338e5d1eb457aab4781
|
File details
Details for the file vizlint-0.2.0-py3-none-any.whl.
File metadata
- Download URL: vizlint-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9ce27b717367f4b7e0ad626d6a390b38790069e4ef754ac7e811e6e25f21509
|
|
| MD5 |
f353a069e2bc53c3fc2efe9427b9f6a9
|
|
| BLAKE2b-256 |
44d1222b3f0648008352d469b35e240f411549cc1f73894be71da4c8768d294d
|