diff --git a/.gitignore b/.gitignore
index 992133e..9d385ed 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
# build
/build/
+/build-*/
/cmake-build-*/
*.o
*.a
diff --git a/doxy/Makefile b/doxy/Makefile
index c075554..ba4444d 100644
--- a/doxy/Makefile
+++ b/doxy/Makefile
@@ -4,7 +4,16 @@
DOXY ?= doxygen
OUT = docs/doxygen/html
-.PHONY: all view clean
+# Gallery regeneration: dark renders use Nord (matched to the doxygen-awesome
+# dark page background #2b303b); light renders use Solarized Light (matches the
+# light page #fdf6e3). The default theme is selected at build time via the
+# -DPLOT_DEFAULT_THEME macro, so the example sources stay theme-neutral.
+DARK_THEME ?= nord
+LIGHT_THEME ?= solarized_light
+EXAMPLES = line_chart scatter heatmap dashboard histogram bar density \
+ contour ohlc graph pie hexbin
+
+.PHONY: all view clean gallery
all:
$(DOXY) Doxyfile 2>&1 | tee doxygen.log
@@ -19,5 +28,18 @@ all:
view: all
xdg-open $(OUT)/index.html
+# Rebuild the theme-aware gallery SVGs from the example programs. Builds the
+# examples twice (dark + light default theme) and copies the renders into the
+# dark/ and light/ dirs that `all` ships into the published HTML.
+gallery:
+ cmake -S .. -B ../build-dark -DPLOTS_BUILD_EXAMPLES=ON -DCMAKE_CXX_FLAGS=-DPLOT_DEFAULT_THEME=$(DARK_THEME)
+ cmake --build ../build-dark -j
+ cd ../build-dark/examples && for e in $(EXAMPLES); do ./$$e; done
+ cp ../build-dark/examples/*.svg dark/
+ cmake -S .. -B ../build-light -DPLOTS_BUILD_EXAMPLES=ON -DCMAKE_CXX_FLAGS=-DPLOT_DEFAULT_THEME=$(LIGHT_THEME)
+ cmake --build ../build-light -j
+ cd ../build-light/examples && for e in $(EXAMPLES); do ./$$e; done
+ cp ../build-light/examples/*.svg light/
+
clean:
$(RM) -rf docs/doxygen doxygen.log
diff --git a/doxy/dark/bar.svg b/doxy/dark/bar.svg
index 47262e9..9d5d36b 100644
--- a/doxy/dark/bar.svg
+++ b/doxy/dark/bar.svg
@@ -1,46 +1,46 @@
diff --git a/doxy/dark/bar_wireframe.svg b/doxy/dark/bar_wireframe.svg
new file mode 100644
index 0000000..399f60e
--- /dev/null
+++ b/doxy/dark/bar_wireframe.svg
@@ -0,0 +1,46 @@
+
diff --git a/doxy/dark/contour.svg b/doxy/dark/contour.svg
index 31c2377..0ffbc6a 100644
--- a/doxy/dark/contour.svg
+++ b/doxy/dark/contour.svg
@@ -1,1052 +1,1052 @@
diff --git a/doxy/dark/dashboard.svg b/doxy/dark/dashboard.svg
index e689062..b17bd07 100644
--- a/doxy/dark/dashboard.svg
+++ b/doxy/dark/dashboard.svg
@@ -1,242 +1,242 @@
diff --git a/doxy/dark/density.svg b/doxy/dark/density.svg
index 6d02f65..c8b3580 100644
--- a/doxy/dark/density.svg
+++ b/doxy/dark/density.svg
@@ -1,38 +1,38 @@
diff --git a/doxy/dark/donut.svg b/doxy/dark/donut.svg
index 8ddd03b..6f2b968 100644
--- a/doxy/dark/donut.svg
+++ b/doxy/dark/donut.svg
@@ -1,16 +1,16 @@
diff --git a/doxy/dark/graph.svg b/doxy/dark/graph.svg
index 586de88..49926ae 100644
--- a/doxy/dark/graph.svg
+++ b/doxy/dark/graph.svg
@@ -1,33 +1,33 @@
diff --git a/doxy/dark/heatmap.svg b/doxy/dark/heatmap.svg
index 0ab49fe..5519ea0 100644
--- a/doxy/dark/heatmap.svg
+++ b/doxy/dark/heatmap.svg
@@ -1,6 +1,6 @@
diff --git a/doxy/dark/hexbin.svg b/doxy/dark/hexbin.svg
index 11b2dfd..a95d751 100644
--- a/doxy/dark/hexbin.svg
+++ b/doxy/dark/hexbin.svg
@@ -1,402 +1,402 @@
diff --git a/doxy/dark/histogram.svg b/doxy/dark/histogram.svg
index 7f17419..2951446 100644
--- a/doxy/dark/histogram.svg
+++ b/doxy/dark/histogram.svg
@@ -1,61 +1,61 @@
diff --git a/doxy/dark/histogram_wireframe.svg b/doxy/dark/histogram_wireframe.svg
new file mode 100644
index 0000000..1a1b3b7
--- /dev/null
+++ b/doxy/dark/histogram_wireframe.svg
@@ -0,0 +1,61 @@
+
diff --git a/doxy/dark/line_chart.svg b/doxy/dark/line_chart.svg
index 602652d..c64c7d3 100644
--- a/doxy/dark/line_chart.svg
+++ b/doxy/dark/line_chart.svg
@@ -1,41 +1,41 @@
diff --git a/doxy/dark/ohlc.svg b/doxy/dark/ohlc.svg
index cd9a4fb..57a710d 100644
--- a/doxy/dark/ohlc.svg
+++ b/doxy/dark/ohlc.svg
@@ -1,119 +1,119 @@
diff --git a/doxy/dark/pie.svg b/doxy/dark/pie.svg
index aac03f6..674f7f6 100644
--- a/doxy/dark/pie.svg
+++ b/doxy/dark/pie.svg
@@ -1,16 +1,16 @@
diff --git a/doxy/dark/scatter.svg b/doxy/dark/scatter.svg
index cf39754..e4be899 100644
--- a/doxy/dark/scatter.svg
+++ b/doxy/dark/scatter.svg
@@ -1,161 +1,161 @@
diff --git a/doxy/docs/index.md b/doxy/docs/index.md
index ed612bb..9af7280 100644
--- a/doxy/docs/index.md
+++ b/doxy/docs/index.md
@@ -137,9 +137,11 @@ shown above.
## Gallery
-Every shipping driver, rendered with the Solarized theme. The image follows the
-page theme — use the moon/sun toggle (top-right) to switch between the Solarized
-**dark** and **light** renders.
+Every shipping driver. The image follows the page theme — use the moon/sun
+toggle (top-right) to switch renders. **Dark** uses the **Nord** theme (matched
+to this site's dark background); **light** uses **Solarized Light**. The bottom
+row shows the hollow (wireframe) `plot::bar` / `plot::histogram` variants beside
+the dashboard.
| | | |
|:-:|:-:|:-:|
@@ -147,7 +149,7 @@ page theme — use the moon/sun toggle (top-right) to switch between the Solariz
|
|
|
|
|
|
|
|
|
|
|
|
-|
| | |
+|
|
|
|
## Themes
diff --git a/doxy/light/bar_wireframe.svg b/doxy/light/bar_wireframe.svg
new file mode 100644
index 0000000..33e487e
--- /dev/null
+++ b/doxy/light/bar_wireframe.svg
@@ -0,0 +1,46 @@
+
diff --git a/doxy/light/donut.svg b/doxy/light/donut.svg
index 81dbf2f..3991be5 100644
--- a/doxy/light/donut.svg
+++ b/doxy/light/donut.svg
@@ -2,15 +2,15 @@
language share (donut)
-
+
Rust
-
+
C++
-
+
Kotlin
-
+
Python
-
+
Other
diff --git a/doxy/light/hexbin.svg b/doxy/light/hexbin.svg
index dd18494..fc6023d 100644
--- a/doxy/light/hexbin.svg
+++ b/doxy/light/hexbin.svg
@@ -2,401 +2,401 @@
hexbin heatmap
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/doxy/light/histogram_wireframe.svg b/doxy/light/histogram_wireframe.svg
new file mode 100644
index 0000000..d3fc598
--- /dev/null
+++ b/doxy/light/histogram_wireframe.svg
@@ -0,0 +1,61 @@
+
diff --git a/doxy/light/pie.svg b/doxy/light/pie.svg
index 62f62c7..73aa165 100644
--- a/doxy/light/pie.svg
+++ b/doxy/light/pie.svg
@@ -2,15 +2,15 @@
language share
-
+
Rust
-
+
C++
-
+
Kotlin
-
+
Python
-
+
Other
diff --git a/examples/dashboard.cpp b/examples/dashboard.cpp
index 794aaef..a7036e3 100644
--- a/examples/dashboard.cpp
+++ b/examples/dashboard.cpp
@@ -8,7 +8,8 @@
#include
int main(){
- plot::theme(plot::solarized_dark);
+ // Renders with the global default theme; set it with plot::theme(t) or
+ // override a single render with plot::use{t}.
// ---- panel 1 + 4 data: a couple of curves -------------------------------
std::vector xs{ 1, 2, 3, 4, 5, 6, 7, 8 },
diff --git a/examples/heatmap.cpp b/examples/heatmap.cpp
index b81869e..ccca088 100644
--- a/examples/heatmap.cpp
+++ b/examples/heatmap.cpp
@@ -8,7 +8,8 @@
#include
int main(){
- plot::theme(plot::solarized_dark); // per-call override also via plot::use{...}
+ // Renders with the global default theme; set it with plot::theme(t) or
+ // override a single render with plot::use{...}.
// axes: payload sizes (columns) and thread counts (rows).
std::vector sizes { "1K", "4K", "16K", "64K", "256K", "1M" },
diff --git a/examples/line_chart.cpp b/examples/line_chart.cpp
index 69c9d40..4e32001 100644
--- a/examples/line_chart.cpp
+++ b/examples/line_chart.cpp
@@ -5,7 +5,8 @@
#include
int main(){
- plot::theme(plot::solarized_dark); // (per-call override is also possible via plot::use{ plot::solarized_light }).
+ // Renders with the global default theme; set it with plot::theme(t) or
+ // override a single render with plot::use{ plot::solarized_light }.
std::vector sizes { 1'000, 4'000, 16'000, 64'000, 256'000, 1'000'000 }, // payload sizes (bytes) — spans 3 decades, so log-x reads naturally.
scalar { 820, 1'500, 2'600, 3'400, 3'900, 4'100 }, // two synthetic throughput curves (MB/s).
diff --git a/examples/scatter.cpp b/examples/scatter.cpp
index 19875f9..83d4d16 100644
--- a/examples/scatter.cpp
+++ b/examples/scatter.cpp
@@ -7,7 +7,8 @@
#include
int main(){
- plot::theme(plot::solarized_dark);
+ // Renders with the global default theme; set it with plot::theme(t) or
+ // override a single render with plot::use{t}.
std::vector xs, ys;
// deterministic pseudo-random cloud around y = 0.8*x + noise.
diff --git a/include/plot/theme.hpp b/include/plot/theme.hpp
index 9af5531..ba2184f 100644
--- a/include/plot/theme.hpp
+++ b/include/plot/theme.hpp
@@ -201,7 +201,14 @@ namespace plot {
};
// process-global default current theme (header-only inline definition).
- inline theme_t current_theme = solarized_dark;
+ // The default can be overridden at build time with
+ // -DPLOT_DEFAULT_THEME= (e.g. nord) — used to regenerate the
+ // theme-aware doxy gallery without editing sources. The runtime default is
+ // unchanged (solarized_dark) unless the macro is defined.
+#ifndef PLOT_DEFAULT_THEME
+#define PLOT_DEFAULT_THEME solarized_dark
+#endif
+ inline theme_t current_theme = PLOT_DEFAULT_THEME;
// setter for the global default.
inline void theme(const theme_t& t){ current_theme = t; }