Metadata-Version: 2.4
Name: pylot-plotter
Version: 1.0.1
Summary: Pylot: A Simple Python Plotter
License-Expression: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PySide6>=6.5
Requires-Dist: pandas>=2.0
Requires-Dist: matplotlib>=3.7
Requires-Dist: scienceplots>=2.1
Requires-Dist: qtawesome>=1.3
Requires-Dist: pywin32; sys_platform == "win32"
Requires-Dist: winshell; sys_platform == "win32"
Dynamic: license-file

<div align="center">

<img src="pylotapp/resources/pylot.svg" width="96" alt="Pylot icon"/>

# Pylot: A Simple Python Plotter

**Plot CSV data instantly — no notebook, no boilerplate.**

[![Version](https://img.shields.io/badge/version-1.0.1-2196F3.svg)](pyproject.toml)
[![Python 3.9+](https://img.shields.io/badge/python-3.9%2B-2196F3.svg)](https://www.python.org/)
[![License: MIT](https://img.shields.io/badge/license-MIT-2196F3.svg)](LICENSE)
[![PySide6](https://img.shields.io/badge/UI-PySide6-41cd52.svg)](https://doc.qt.io/qtforpython/)

</div>

Open one or more CSV files, choose your X and Y columns, and plot — in seconds. Mix series across files, style each one independently, compute error metrics, and export publication-ready figures. Runs on Linux, Windows, and macOS.

---

## Install

```bash
pip install pylot-plotter
```

Then launch from anywhere:

```bash
pylot
```

**Linux** — the application menu entry is registered automatically on first launch.

**Windows** — run `pylot-register` once after installing to add a Start Menu shortcut (it also runs automatically on first launch):

```bash
pylot-register
```

---

## Quick start

1. **File → Open CSV…** (or drag-and-drop) — load one or more files.
2. **Series tab** — each row is an independent series. Pick X and Y columns from any loaded file, choose Line or Scatter, and hit **Plot**.
3. **Appearance / Axes tabs** — toggle grid, log scale, limits, fonts, and annotations.
4. **Export tab** — save as PNG, PDF, or SVG at any DPI.

---

## Features

### Data loading
- Load **multiple CSV files** at once; auto-detects delimiters (comma, semicolon, tab, …)
- Inline **preview table** shows up to 1 000 rows per file
- **Recent files** menu (last 8 files) with one-click re-open
- Duplicate filenames get automatic `(2)`, `(3)` suffixes so nothing overwrites

### Series
- **Per-series X / Y pickers** — any column from any loaded file; cross-file pairs work as long as lengths match
- **Line or Scatter** per series, plus a **right Y-axis** option (`Line (R)` / `Scatter (R)`)
- **Drag rows** to change plotting / legend order
- **Add all columns** — one click to plot every numeric column against the first column
- **Duplicate** a series (copies style and data selection in one click)
- **Show / hide** individual series without deleting them
- Color swatch in the table — click directly to change color without opening a dialog

### Style (per series)
- Color, line style, line width, opacity
- Marker symbol: Circle, Square, Triangle, Diamond, Plus, Cross, Star, Point, or None
- Marker edge outline on / off
- Scatter point size

### Appearance tab
- Grid lines, X / Y log scale, equal aspect ratio
- **Custom axes W : H** — control the plot box proportions independently of data units
- **Reference lines** — horizontal or vertical marker lines at any position, each with its own color / style / width / opacity
- **Fill bands** — shaded axhspan / axvspan regions with custom color and opacity; useful for tolerance bands or highlighted ranges

### Axes tab
- Axis labels and title (`#none` to suppress any of them)
- Manual X / Y limits (blank = auto)
- Tick label size and tick count, controlled per-axis
- Font family picker (all system fonts, live preview in the plot)
- Legend: position, frame, show / hide
- Spine (border) width
- **Text annotations** — place styled text anywhere using axes coordinates (0 – 1) or data coordinates

### Metrics tab *(hidden by default)*
- **RMSD, MAE, MSE** computed between any two numeric columns
- Works across files (same-length requirement)
- **Add to plot** checkbox injects each metric as a text annotation on the figure
- Per-metric annotation settings: position, font size / weight, color, alignment, units, decimal places

Enable the Metrics tab via the **⚙** button on the tab bar.

### Export
- **PNG, PDF, SVG** with automatic extension management
- DPI control (72 – 600) for raster formats
- Transparent background (respected in the exported file)
- All export settings persist between sessions

### App
- Publication-style defaults via [SciencePlots](https://github.com/garrettj403/SciencePlots) (`science, notebook`) — DejaVu Serif, clean spines, no grid
- **Undo / Redo** (Ctrl+Z / Ctrl+Y) for series, reference lines, fill bands, and annotations — 20-level history
- **Tab visibility** — show / hide individual tabs via the ⚙ corner button; choice persists across sessions
- Window geometry, splitter position, and export settings all persist between sessions
- **Reset view** button on the plot toolbar — redraws from current settings, undoing any zoom / pan

---

## Keyboard shortcuts

| Action | Shortcut |
|---|---|
| Open CSV | Ctrl+O |
| Undo | Ctrl+Z |
| Redo | Ctrl+Y |
| Quit | Ctrl+Q |

---

## Requirements

- Python 3.9+
- PySide6 ≥ 6.5
- pandas ≥ 2.0
- matplotlib ≥ 3.7
- scienceplots ≥ 2.1
- qtawesome ≥ 1.3

---

## License

[MIT](LICENSE)
