Releases: glentner/plot-cli
Releases · glentner/plot-cli
Scatter Support & Quality Audit
What's New in 0.5.0
Scatter Plot Support
- New
--scatterflag renders scatter plots in the terminal - New
--marker CHARoption to customize the scatter marker character (default:•) --plot-type scatteralso accepted as the long form- Scatter follows the same mutually exclusive group as
--lineand--hist
Quality Fixes
- Fixed
Pandas4Warningdeprecation: JSON output now usesdate_format="iso"instead of the deprecated"epoch"default - Updated README with scatter documentation, usage examples, and corrected install command
Test Coverage
- Added unit test for
--scatterflag acceptance - Added
TestPlotTypeOptionsintegration test class covering--scatterand--linewith both--jsonand--csvoutput modes - Test suite: 52 tests, all passing with zero warnings
Install
uv tool install git+https://github.com/glentner/plot-cli
Usage
plot data.csv --scatter -x x -y y
plot data.csv --scatter --marker x -x x -y y
Full Changelog: 0.4.0...0.5.0
DuckDB backend and time-series overhaul
What's New in 0.4.0
This release is a major overhaul of the internals, replacing the old data loading pipeline with a DuckDB-based query engine and significantly expanding time-series capabilities.
Build System
- Migrated from Poetry to uv/hatchling (PEP 621
[project]table) - Added
duckdb>=1.0.0as a core dependency - Added
pyarrow>=15.0.0for Parquet support - Replaced
poetry.lockwithuv.lock - Install via
uv tool install plot-cli
DuckDB Query Engine
The old provider.py / data.py pipeline has been replaced with a new query.py module built around QueryBuilder, which uses DuckDB for all data loading and transformation:
- Load CSV, JSON, and Parquet files (auto-detected or explicit with
--format) - Read from stdin in CSV or JSON format
--where EXPR— SQLWHEREclause filtering--after DATETIME/--before DATETIME— datetime range filters on the x-column-S/--scale OFFSET— datetime offset conversion- Column names are safely quoted in all generated SQL
Time-Series Aggregation (-B/--bucket)
-B/--bucket INTERVAL— group data into time buckets (e.g.15min,1h,1d)- Aggregation methods:
--mean,--sum,--min,--max,--first,--last --count— count rows per bucket; works without a-ycolumn, eliminating the need for manualawkinjection-F/--resampleis now deprecated in favor of-B/--bucket
Multi-Series Grouping (--by)
--by COLUMN— group data by a categorical column and plot each group as a separate series- Implemented via a DuckDB
PIVOTquery (long → wide format) - NaN values in line plots are handled gracefully
- Works with or without time bucketing
Smart Time-Series Axis Labels
- Time-series plots (
-T) now show formattedHH:MMtick labels - Adaptive tick generation based on detected time granularity
- Secondary date context labels below the time axis
- UTC used consistently for timezone handling
Output Modes
--csv— output the processed/aggregated data as CSV instead of plotting--json— output the processed/aggregated data as JSON instead of plotting
Tests
- New
tests/test_query.pywith comprehensiveQueryBuilderunit tests - New
tests/test_cli.pywith CLI integration tests covering all major options
Fix tz conversion
Timeseries data with tz info was broken. Uses proper to_datetime method now.