Skip to content

[#15]:svarga:feature, GR.jl-style plot API (line/scatter) + Solarized themes#18

Merged
steven-varga merged 3 commits into
stagingfrom
15-gr-api-themes
Jun 17, 2026
Merged

[#15]:svarga:feature, GR.jl-style plot API (line/scatter) + Solarized themes#18
steven-varga merged 3 commits into
stagingfrom
15-gr-api-themes

Conversation

@steven-varga

Copy link
Copy Markdown
Contributor

Closes #15.

GR.jl-style functional surface on plot:: + Solarized theming, and plot:: is now standalone (no bench/ dependency).

New (include/plot/)

  • theme.hppplot::theme_t, solarized_dark/solarized_light, global current_theme + plot::theme(t) setter, plot::use{t} per-call override.
  • gr.hppplot::line (single + multi-series w/ legend), plot::scatter, GR options xlabel/ylabel/xlog/ylog, shared panel/axis-scale/tick layout, theme resolution.

Changed

  • meta.hpp — dropped the #include <bench/meta.hpp> bridge; self-contained plot::arg/plot::impl. grep -rn 'bench' include/plot/ is empty.
  • tags.hpp, heatmap.hpp (gradient←theme, theme bg rect, honors use{}), all.
  • examples line_chart.cpp (dark) + scatter.cpp (light); test/plot_gr.cpp; appended example/test targets; test/svg.cpp rect-count updated for the theme bg rect.

API

plot::line(os|file, xs, ys, opts...), multi-series plot::line(os, xs, {{"label",data},...}, opts...), plot::scatter(...). Options: title/xlabel/ylabel/xlog/ylog/width/height/margin/use.

Verification

Build clean (C++23, zero third-party); ctest 6/6; line_chart/scatter render themed SVG (dark #002B36, light #FDF6E3).

Note: absolute axis tick text uses text-anchor=start (canvas text() derives anchor from coord variant, not attr.align) — cosmetic, deferred per rework-phase guidance.

Base: staging.

@steven-varga steven-varga merged commit ba6178c into staging Jun 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant