Skip to content

Releases: glentner/plot-cli

Scatter Support & Quality Audit

20 Mar 14:25
0.5.0

Choose a tag to compare

What's New in 0.5.0

Scatter Plot Support

  • New --scatter flag renders scatter plots in the terminal
  • New --marker CHAR option to customize the scatter marker character (default: )
  • --plot-type scatter also accepted as the long form
  • Scatter follows the same mutually exclusive group as --line and --hist

Quality Fixes

  • Fixed Pandas4Warning deprecation: JSON output now uses date_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 --scatter flag acceptance
  • Added TestPlotTypeOptions integration test class covering --scatter and --line with both --json and --csv output 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

18 Feb 19:34
0.4.0
09e3319

Choose a tag to compare

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.0 as a core dependency
  • Added pyarrow>=15.0.0 for Parquet support
  • Replaced poetry.lock with uv.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 — SQL WHERE clause 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 -y column, eliminating the need for manual awk injection
  • -F/--resample is 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 PIVOT query (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 formatted HH:MM tick 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.py with comprehensive QueryBuilder unit tests
  • New tests/test_cli.py with CLI integration tests covering all major options

Fix tz conversion

26 Feb 20:06
0.3.2
90e682b

Choose a tag to compare

Timeseries data with tz info was broken. Uses proper to_datetime method now.