refactor: miscellaneous fixes to visualizations
This change introduces some minor refactoring work to both
visualization scripts, namely:
- Comments reflowed to reach 80 characters per line
- Fixes to the category names for more recent versions of Tokei
- GNUPlot scripts no longer require a fixed number of columns
- Whitespace inconsistency fixes
SLOC-specific changes:
- Updated extended color palette to prevent color cycling
- Search directories can now be passed via arguments
- Parent directories no longer include their children's stats
Change-Id: I3f0ecb849a97f1f8008423772ddde4ca8c4771c2
Signed-off-by: Chris Kay <chris.kay@arm.com>
Co-authored-by: Weronika Wiesiolek <weronika.wiesiolek@arm.com>
diff --git a/script/graphs/sloc-viz.plot b/script/graphs/sloc-viz.plot
index a334b89..24633ce 100644
--- a/script/graphs/sloc-viz.plot
+++ b/script/graphs/sloc-viz.plot
@@ -1,23 +1,38 @@
#
-# Copyright (c) 2021 Arm Limited. All rights reserved.
+# Copyright (c) 2021-2022 Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
-#
-# Stacked histograms
-#
-set terminal png enhanced font ",18" size 1920, 1080
+
set title "Source Lines of Code by Module"
-set key invert reverse Left outside
+set terminal png enhanced font ",16" size 1920, 1080
+
+set datafile separator tab
+
set key autotitle columnheader
-set auto y
-set auto x
-unset xtics
+set key reverse Left outside
+
set xtics nomirror rotate by -75 scale 0
+
set style data histogram
set style histogram rowstacked
set style fill solid border -1
+
set boxwidth 0.75
-#
-plot ARG1 using 2:xtic(1), for [i=3:8] '' using i
-#
+
+set lt 1 lc rgb "#C971B2"
+set lt 2 lc rgb "#78D19F"
+set lt 3 lc rgb "#CB9B6B"
+set lt 4 lc rgb "#7696C0"
+set lt 5 lc rgb "#ECEAC6"
+set lt 6 lc rgb "#D2CCDA"
+set lt 7 lc rgb "#766AC9"
+set lt 8 lc rgb "#C86D6A"
+set lt 9 lc rgb "#92CCD7"
+set lt 10 lc rgb "#DEAAB5"
+set lt 11 lc rgb "#BC9FD9"
+set lt 12 lc rgb "#A5B08B"
+
+stats ARG1 matrix rowheader columnheader nooutput
+
+plot ARG1 using 2:xtic(1), for [i=3:(STATS_columns + 1)] "" using i