Metadata-Version: 2.4
Name: vizlint
Version: 0.2.0
Summary: Lint Python visualizations for common misleading patterns.
Author: jaeday1212
License: MIT
License-File: LICENSE
Keywords: charts,data-science,lint,matplotlib,visualization
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.9
Provides-Extra: mpl
Requires-Dist: matplotlib>=3.7; extra == 'mpl'
Description-Content-Type: text/markdown

# vizlint

Lint Python charts for common misleading or low-quality patterns.

## Install
```bash
pip install vizlint
pip install "vizlint[mpl]"
```

## Quickstart (Matplotlib)
```python
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:

```text
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
```bash
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:

```bash
vizlint my_script.py --disable axis_labels_missing --disable bar_zero_baseline
```
