Index: doc/theses/mike_brooks_MMath/plots/common.py
===================================================================
--- doc/theses/mike_brooks_MMath/plots/common.py	(revision 241042418538c37dbb8067200a54e09c370946d2)
+++ doc/theses/mike_brooks_MMath/plots/common.py	(revision f858ca51b2d9f59b5d8a2ff62b2a2c3403410a4e)
@@ -17,12 +17,15 @@
 
     dt[['corpus-basename',
-        'corpus-ext']] = dt['corpus'].str.strip().str.split('.', expand=True)
+        'corpus-ext']] = dt['corpus'].str.strip().str.rsplit('.', n=1, expand=True)
     dt[['corpus-slug',
-        'corpus-nstrs',
-        'corpus-meanlen',
+        'corpus-nstrs-tgt',
+        'corpus-meanlen-tgt',
         'corpus-runid']] = dt['corpus-basename'].str.strip().str.split('-', expand=True)
-    dt["corpus-nstrs"] = pd.to_numeric(dt["corpus-nstrs"])
-    dt["corpus-meanlen"] = pd.to_numeric(dt["corpus-meanlen"])
-    dt["corpus-runid"] = pd.to_numeric(dt["corpus-runid"])
+    dt["corpus-nstrs-tgt"] = pd.to_numeric(dt["corpus-nstrs-tgt"])
+    dt["corpus-meanlen-tgt"] = pd.to_numeric(dt["corpus-meanlen-tgt"])
+    dt[['corpus-relscale',
+        'corpus-seed',
+        'corpus-offset-instr']] = dt['corpus-runid'].str.strip().str.split('+', expand=True)
+    dt["corpus-relscale"] = pd.to_numeric(dt["corpus-relscale"])
 
 def loadParseTimingData( infileLocal, xClasNames=[], xClasDtypes={}, xFactNames=[], xFactDtypes={} ):
@@ -32,11 +35,11 @@
     timings = pd.read_csv(
         infile,
-        names=['test', 'corpus'] + xClasNames + [ 'concatsPerReset', 'corpusItemCount', 'corpusMeanLenChars', 'concatDoneActualCount', 'execTimeActualSec'] + xFactNames,
+        names=['test', 'corpus'] + xClasNames + [ 'concatsPerReset', 'corpusItemCountAct', 'corpusMeanLenCharsAct', 'concatDoneActualCount', 'execTimeActualSec'] + xFactNames,
         dtype={**xClasDtypes, **xFactDtypes, **{
             'test':                  str,
             'corpus':                str,
             'concatsPerReset':       'Int64', # allows missing; https://stackoverflow.com/a/70626154
-            'corpusItemCount':       np.int64,
-            'corpusMeanLenChars':    np.float64,
+            'corpusItemCountAct':    np.int64,
+            'corpusMeanLenCharsAct': np.float64,
             'concatDoneActualCount': np.int64,
             'execTimeActualSec':     np.float64,
Index: doc/theses/mike_brooks_MMath/plots/string-allocn-attrib-meta.dat
===================================================================
--- doc/theses/mike_brooks_MMath/plots/string-allocn-attrib-meta.dat	(revision f858ca51b2d9f59b5d8a2ff62b2a2c3403410a4e)
+++ doc/theses/mike_brooks_MMath/plots/string-allocn-attrib-meta.dat	(revision f858ca51b2d9f59b5d8a2ff62b2a2c3403410a4e)
@@ -0,0 +1,1 @@
+harness-leaf other ctor-dtor gc malloc-free text-import
Index: doc/theses/mike_brooks_MMath/plots/string-allocn-attrib.py
===================================================================
--- doc/theses/mike_brooks_MMath/plots/string-allocn-attrib.py	(revision 241042418538c37dbb8067200a54e09c370946d2)
+++ doc/theses/mike_brooks_MMath/plots/string-allocn-attrib.py	(revision f858ca51b2d9f59b5d8a2ff62b2a2c3403410a4e)
@@ -14,4 +14,5 @@
 import os
 import sys
+from pathlib import Path
 
 sys.path.insert(0, os.path.dirname(__file__))
@@ -19,12 +20,20 @@
 
 sizes_i_want = [50, 200] # [20, 50, 100, 200]
+defaultExpansionCfa = 0.2
 
-# assume CFA threshold only run at default value
+metaFilename = os.path.dirname(os.path.abspath(__file__)) + '/string-allocn-attrib-meta.dat'
+catOrder = Path(metaFilename).read_text()
+catOrder = str.split(catOrder)
 
 cfatimings = loadParseTimingData('result-allocate-speed-cfa.csv',
                 xClasNames=['expansion'], xClasDtypes={'expansion':'Float64'},
                 xFactNames=['topIters'], xFactDtypes={'topIters':np.int64})
+cfatimings = cfatimings.groupby('expansion').get_group(defaultExpansionCfa)
 
 cfaattribs = loadParseAttribData('result-allocate-attrib-cfa.ssv')
+cfaattribs = cfaattribs.groupby('expansion').get_group(defaultExpansionCfa)
+
+cfasizings = loadParseSizingData('result-allocate-space-cfa.ssv', xClasNames=['expansion'], xClasDtypes={'expansion':'Float64'})
+cfasizings = cfasizings.groupby('expansion').get_group(defaultExpansionCfa)
 
 stltimings = loadParseTimingData('result-allocate-speed-stl.csv',
@@ -34,23 +43,91 @@
 stlattribs = loadParseAttribData('result-allocate-attrib-stl.ssv')
 
+stlsizings = loadParseSizingData('result-allocate-space-stl.ssv', xClasNames=['expansion'], xClasDtypes={'expansion':'Float64'})
+
 timings = pd.concat([cfatimings, stltimings])
 attribs = pd.concat([cfaattribs, stlattribs])
+sizings = pd.concat([cfasizings, stlsizings])
+
+# print("before join", timings.shape[0], attribs.shape[0])
+# print(timings.to_csv(header=True, index=True, sep='\t', na_rep="0"))
+# print(attribs.to_csv(header=True, index=True, sep='\t', na_rep="0"))
+# print(sizings.to_csv(header=True, index=True, sep='\t', na_rep="0"))
 
 combined = pd.merge(
-    left=timings[['sut-platform', 'corpus-meanlen','expansion', 'op-duration-ns']],
-    right=attribs[['sut-platform', 'corpus-meanlen','expansion', 'category', 'fraction']],
-    on=['sut-platform', 'corpus-meanlen','expansion']
+    left=timings[['sut-platform', 'corpus', 'corpus-meanlen-tgt','expansion', 'op-duration-ns']],
+    right=attribs[['sut-platform', 'corpus', 'expansion', 'category', 'fraction']],
+    on=['sut-platform', 'corpus','expansion']
 )
 
+combined = pd.merge(
+    left=combined,
+    right=sizings[['sut-platform', 'corpus','expansion','hw_cur_req_mem(B)']],
+    on=['sut-platform', 'corpus','expansion']
+)
+
+# print("after join", combined.shape[0])
+# print(combined.to_csv(header=True, index=True, sep='\t', na_rep="0"))
+
 combined['cat-duration-ns'] = combined['op-duration-ns'] * combined['fraction']
-combined.drop(columns=['expansion', 'op-duration-ns', 'fraction'], inplace=True)
+combined.drop(columns=['expansion', 'op-duration-ns', 'fraction', 'corpus'], inplace=True)
 
-pvt = combined.pivot( columns='category', values='cat-duration-ns', index=['corpus-meanlen', 'sut-platform'] )
+# print("before summarize", combined.shape[0])
+# print(combined.to_csv(header=True, index=True, sep='\t', na_rep="0"))
 
-desired_dcol_order = ["ctor-dtor", "gc", "malloc-free", "text-import", "harness-leaf", "other"]
-pvt = pvt[desired_dcol_order]
+summary = combined.pivot_table(
+    values=['hw_cur_req_mem(B)','cat-duration-ns'],
+    index=['corpus-meanlen-tgt', 'sut-platform', 'category'],
+    aggfunc={'hw_cur_req_mem(B)':'mean','cat-duration-ns':['mean', 'min', 'max']} )
+summary = summary.reset_index()
+summary.columns = summary.columns.to_flat_index()
+summary.columns = [
+    '-'.join(filter(None, col)).replace(' ', '-')  # replaces space with dash if needed
+    for col in summary.columns.to_flat_index()
+]
 
-filtered = pvt.loc[pvt.index.get_level_values('corpus-meanlen').isin(sizes_i_want)]
+# reorder columns with memory as first value (after sut-platform, which is last key)
+# cols = summary.columns.tolist()
+# cols.remove("hw_cur_req_mem(B)-mean")
+# insert_after = cols.index("sut-platform") + 1
+# cols.insert(insert_after, "hw_cur_req_mem(B)-mean")
+# summary = summary[cols]
 
-print(filtered.to_csv(header=True, index=True, sep='\t', na_rep="0"))
+summary = summary[[
+    'corpus-meanlen-tgt',
+    'sut-platform',
+    'hw_cur_req_mem(B)-mean',
+    'category',
+    'cat-duration-ns-mean',
+    'cat-duration-ns-max',
+    'cat-duration-ns-min']]
 
+# print("after summarize", summary.shape[0])
+# print(summary.to_csv(header=True, index=True, sep='\t', na_rep="0"))
+
+
+
+# Ensure 'category' follows the specified order
+summary['category'] = pd.Categorical(summary['category'], categories=catOrder, ordered=True)
+
+# Sort the DataFrame to prepare for cumulative sum
+summary_sorted = summary.sort_values(by=['corpus-meanlen-tgt', 'sut-platform',  'category'])
+
+# Group by the keys and compute exclusive running total
+summary_sorted['grp-prior-duration-ns'] = (
+    summary_sorted
+    .groupby(['corpus-meanlen-tgt', 'sut-platform'])['cat-duration-ns-mean']
+    .transform(lambda s: s.cumsum().shift(fill_value=0))
+)
+
+summary_sorted = summary_sorted.reset_index(drop=True)
+
+
+# print("after accumulation", summary_sorted.shape[0])
+# print(summary_sorted.to_csv(header=True, index=True, sep='\t', na_rep="0"))
+
+
+filtered = summary_sorted[summary_sorted['corpus-meanlen-tgt'].isin(sizes_i_want)]
+
+# print("after filter", filtered.shape[0])
+
+print(filtered.to_csv(header=True, index=False, sep='\t', na_rep="0"))
Index: doc/theses/mike_brooks_MMath/plots/string-allocn.gp
===================================================================
--- doc/theses/mike_brooks_MMath/plots/string-allocn.gp	(revision 241042418538c37dbb8067200a54e09c370946d2)
+++ doc/theses/mike_brooks_MMath/plots/string-allocn.gp	(revision f858ca51b2d9f59b5d8a2ff62b2a2c3403410a4e)
@@ -5,4 +5,5 @@
 INDIR="build"
 OUTDIR="build"
+SRCDIR="plots"
 
 SCALE=1024
@@ -11,13 +12,7 @@
 set macros
 set output OUTDIR."/plot-string-allocn.pdf"
-set multiplot layout 1, 3 ;
-set key outside top center horizontal
+set multiplot layout 1, 2 ;
 set grid
 
-# common to only first two graphs
-set logscale x 2
-#set mxtics 3                      # 3 steps within each doubling (e.g. 3 steps of of 32 between 32 and 128 => tick on 32s in there)
-set xlabel "Heap Used (B)"
-set logscale y 10
 
 #
@@ -25,9 +20,16 @@
 #
 
+#set errorbars dashtype '.'
+
+set logscale x 2
+set xlabel "Heap Used (B)"
+set logscale y 10
+set key outside top center
+
 set ylabel "Duration (ns)" offset 2,0
-set yrange[35:125]
-set ytics add (40, 50, 60, 70, 80, 90, 110, 120)
+set yrange[40:150]
+set ytics add (40, 50, 60, 70, 80, 90, 110, 120, 130, 140, 150)
 
-set xrange[32:4096]
+set xrange[32:8192]
 set xtics rotate by -90
 set xtics ("" 32, "64 k" 64, "" 128, "256 k" 256, "" 512, "1 M" 1024, "" 2048, "4 M" 4096)
@@ -35,16 +37,39 @@
 # First each curve, then each default-expansion point
 plot INDIR."/plot-string-allocn.dat" \
-	   i 0 using ($3/SCALE):2 title columnheader(1) with linespoints lt rgb "blue"    pt  2   ps 1 lw 1, \
-	'' i 1 using ($3/SCALE):2 title columnheader(1) with linespoints lt rgb "red"     pt  3   ps 1 lw 1, \
-	'' i 2 using ($3/SCALE):2 title columnheader(1) with linespoints lt rgb "brown"   pt  8   ps 1 lw 1, \
-	'' i 3 using ($3/SCALE):2 title columnheader(1) with linespoints lt rgb "black"   pt  10  ps 1 lw 1, \
-	'' i 4 using ($3/SCALE):2 title columnheader(1) with linespoints lt rgb "magenta" pt  12  ps 1 lw 1, \
-	'' i 0 using ( ($4 == 1) ? ($3/SCALE) : 1/0 ):2 notitle with points lt rgb "blue"    pt  66 ps 2, \
-	'' i 1 using ( ($4 == 1) ? ($3/SCALE) : 1/0 ):2 notitle with points lt rgb "red"     pt  66 ps 2, \
-	'' i 2 using ( ($4 == 1) ? ($3/SCALE) : 1/0 ):2 notitle with points lt rgb "brown"   pt  66 ps 2, \
-	'' i 3 using ( ($4 == 1) ? ($3/SCALE) : 1/0 ):2 notitle with points lt rgb "black"   pt  66 ps 2, \
-	'' i 4 using ( ($4 == 1) ? ($3/SCALE) : 1/0 ):2 notitle with points lt rgb "magenta" pt  66 ps 2
+	   i 0 using ($5/SCALE):2     notitle               with lines      lt rgb "blue"        dt '.'  lw 2, \
+	'' i 1 using ($5/SCALE):2     notitle               with lines      lt rgb "red"         dt '.'  lw 2, \
+	'' i 2 using ($5/SCALE):2     notitle               with lines      lt rgb "brown"       dt '.'  lw 2, \
+	'' i 3 using ($5/SCALE):2     title "tuning contour" with lines     lt rgb "black"       dt '.'  lw 2, \
+	'' i 4 using ($5/SCALE):2     notitle               with lines      lt rgb "magenta"     dt '.'  lw 2, \
+	'' i 0 using ($5/SCALE):2:3:4 notitle               with yerrorbars lt rgb "blue"    pt  7  ps 0.25 lw 1, \
+	'' i 1 using ($5/SCALE):2:3:4 notitle               with yerrorbars lt rgb "red"     pt  7  ps 0.25 lw 1, \
+	'' i 2 using ($5/SCALE):2:3:4 notitle               with yerrorbars lt rgb "brown"   pt  7  ps 0.25 lw 1, \
+	'' i 3 using ($5/SCALE):2:3:4 notitle               with yerrorbars lt rgb "black"   pt  7  ps 0.25 lw 1, \
+	'' i 4 using ($5/SCALE):2:3:4 notitle               with yerrorbars lt rgb "magenta" pt  7  ps 0.25 lw 1, \
+	'' i 0 using ( ($8 == 1) ? ($5/SCALE) : 1/0 ):2 notitle with points lt rgb "blue"    pt  66 ps 2, \
+	'' i 1 using ( ($8 == 1) ? ($5/SCALE) : 1/0 ):2 notitle with points lt rgb "red"     pt  66 ps 2, \
+	'' i 2 using ( ($8 == 1) ? ($5/SCALE) : 1/0 ):2 notitle with points lt rgb "brown"   pt  66 ps 2, \
+	'' i 3 using ( ($8 == 1) ? ($5/SCALE) : 1/0 ):2 title "default tuning" \
+	                                                        with points lt rgb "black"   pt  66 ps 2, \
+	'' i 4 using ( ($8 == 1) ? ($5/SCALE) : 1/0 ):2 notitle with points lt rgb "magenta" pt  66 ps 2, \
+	'' i 0 using ($5/SCALE):2:("{/Times=15 len-\n20")  every ::1::1 with labels left  offset  0.75,0.25 textcolor rgb "blue"    notitle, \
+	'' i 1 using ($5/SCALE):2:("{/Times=15 len-\n50")  every ::5::5 with labels right offset -0.6 ,1.5  textcolor rgb "red"     notitle, \
+	'' i 2 using ($5/SCALE):2:("{/Times=15 len-\n100") every ::4::4 with labels right offset -0.75,0.5  textcolor rgb "brown"   notitle, \
+	'' i 3 using ($5/SCALE):2:("{/Times=15 len-\n200") every ::4::4 with labels right offset -0.75,1.25 textcolor rgb "black"   notitle, \
+	'' i 4 using ($5/SCALE):2:("{/Times=15 len-\n500") every ::4::4 with labels right offset -0.75,0.25 textcolor rgb "magenta" notitle, \
+	'' i 5 using                          ($5/SCALE)        :2     notitle               with lines       lt rgb "#BF007F7F"               lw 8, \
+	'' i 6 using                          ($5/SCALE)        :2     notitle               with lines       lt rgb "#BF007F7F"               lw 8, \
+	'' i 7 using                          ($5/SCALE)        :2     notitle               with lines       lt rgb "#BF007F7F"               lw 8, \
+	'' i 8 using                          ($5/SCALE)        :2     title "tradeoff"      with lines       lt rgb "#BF007F7F"              lw 8, \
+	'' i 9 using                          ($5/SCALE)        :2     notitle               with lines       lt rgb "#BF007F7F"               lw 8, \
+	'' i 5 using ( (strcol(8) eq "stl") ? ($5/SCALE) : 1/0 ):2:3:4 notitle               with yerrorbars  lt rgb "#00007F7F"  pt 6     ps 0.5 lw 2 ,       \
+	'' i 6 using ( (strcol(8) eq "stl") ? ($5/SCALE) : 1/0 ):2:3:4 notitle               with yerrorbars  lt rgb "#00007F7F"  pt 6     ps 0.5 lw 2 ,       \
+	'' i 7 using ( (strcol(8) eq "stl") ? ($5/SCALE) : 1/0 ):2:3:4 notitle               with yerrorbars  lt rgb "#00007F7F"  pt 6     ps 0.5 lw 2 ,       \
+	'' i 8 using ( (strcol(8) eq "stl") ? ($5/SCALE) : 1/0 ):2:3:4 notitle               with yerrorbars  lt rgb "#00007F7F"  pt 6     ps 0.5 lw 2 , \
+	'' i 9 using ( (strcol(8) eq "stl") ? ($5/SCALE) : 1/0 ):2:3:4 notitle               with yerrorbars  lt rgb "#00007F7F"  pt 6     ps 0.5 lw 2
+
 
 unset ylabel
+unset xlabel
 
 unset xtics
@@ -53,41 +78,4 @@
 unset xrange
 
-
-#
-# STL comparison
-#
-
-
-set yrange[40:85]
-set ytics add (40, 45, 50, 55, 60, 65, 70, 75, 80, 85)
-set mytics 90                     # 90 steps within each decade (e.g. 90 steps of of 1 between 10 and 100 => tick on 1s in there)
-
-set xrange[64:4096]
-set xtics rotate by -90
-set xtics ("64 k" 64, "128 k" 128, "256 k" 256, "512 k" 512, "1 M" 1024, "2 M" 2048, "4 M" 4096)
-
-# skullduggeries:
-# hardcoding chunk index and assuming data in the chunk (by hardcoding only the stl series title)
-# series order is meaningless but important: achieves z-order readability and legend order acceptability
-
-plot INDIR."/plot-string-allocn.dat" \
-	   i 8 using                          ($3/SCALE)        :2 title "tradeoff"      with lines       lt rgb "#77000000"  dt (2,2)       lw 8, \
-	'' i 1 using                          ($3/SCALE)        :2 title columnheader(1) with linespoints lt rgb "red"        pt  3    ps 1  lw 1, \
-	'' i 6 using ( (strcol(4) eq "cfa") ? ($3/SCALE) : 1/0 ):2 notitle               with points      lt rgb "red"        pt 66    ps 2,       \
-	'' i 6 using                          ($3/SCALE)        :2 notitle               with lines       lt rgb "#77000000"  dt (2,2)       lw 8, \
-	'' i 6 using ( (strcol(4) eq "stl") ? ($3/SCALE) : 1/0 ):2 title "stl, len=50"   with points      lt rgb "red"        pt 5     ps 1,       \
-	'' i 3 using                          ($3/SCALE)        :2 title columnheader(1) with linespoints lt rgb "black"      pt  10   ps 1  lw 1, \
-	'' i 8 using ( (strcol(4) eq "stl") ? ($3/SCALE) : 1/0 ):2 title "stl, len=200"  with points      lt rgb "black"      pt 5     ps 1,       \
-	'' i 8 using ( (strcol(4) eq "cfa") ? ($3/SCALE) : 1/0 ):2 notitle               with points      lt rgb "black"      pt 66    ps 2
-
-
-unset mytics
-unset ytics
-unset yrange
-unset xrange
-
-
-
-# common to first two graphs
 unset logscale
 unset xlabel
@@ -98,11 +86,56 @@
 #
 
-set style data histogram
+set key outside top center vertical maxrows 3
+
+set logscale x 2
+#set mxtics 3                      # 3 steps within each doubling (e.g. 3 steps of of 32 between 32 and 128 => tick on 32s in there)
+
+set yrange[0:105]
 set ytics auto
-set style histogram clustered gap 1 rowstacked
-set style fill solid border -1
-set boxwidth 0.8
-set xtics rotate by -45
 
-plot for [col=3:8] \
-    INDIR.'/plot-string-allocn-attrib.dat' using col:xticlabels(stringcolumn(2).", len=".stringcolumn(1)) index 0 title columnheader(col)
+set xrange[2.0e4:3e7]
+# set xtics rotate by -90
+# set xtics ("" 32, "64 k" 64, "" 128, "256 k" 256, "" 512, "1 M" 1024, "" 2048, "4 M" 4096)
+
+set style fill solid 1.0
+
+BAR_RELWD = 0.5
+BAR_XSHIFT = (1+BAR_RELWD)**(-0.55)
+LEN_X_SEP = 1.7
+
+# get segment draw order (front to back) from metadata file
+meta = system('cat '.SRCDIR.'/string-allocn-attrib-meta.dat')
+STATS_words = words(meta)
+array STATS_word[STATS_words]
+do for [i=1:STATS_words] {
+    STATS_word[i] = word(meta, i)
+}
+
+
+
+plot \
+	for [i=STATS_words:1:-1] \
+	INDIR.'/plot-string-allocn-attrib.dat' \
+		using (stringcolumn("category") eq STATS_word[i] ? (BAR_XSHIFT*$1**LEN_X_SEP*$3/SCALE) : 1/0): \
+			  (stringcolumn("category") eq STATS_word[i] ? ($5 + $8) : 1/0): \
+			  (stringcolumn("category") eq STATS_word[i] ? (BAR_RELWD*(BAR_XSHIFT*$1**LEN_X_SEP*$3/SCALE)) : 1/0) \
+		with boxes ls i title STATS_word[i], \
+	INDIR."/plot-string-allocn.dat" \
+	   i 1 using (50 **LEN_X_SEP*$5/SCALE):2     notitle with lines      lt rgb "red"         dt '.'  lw 2, \
+	'' i 3 using (200**LEN_X_SEP*$5/SCALE):2     notitle with lines      lt rgb "black"       dt '.'  lw 2, \
+	'' i 1 using ( ($8 == 1) ? (50 **LEN_X_SEP*$5/SCALE) : 1/0 ):2 notitle with points lt rgb "red"     pt  66 ps 2, \
+	'' i 3 using ( ($8 == 1) ? (200**LEN_X_SEP*$5/SCALE) : 1/0 ):2 notitle with points lt rgb "black"   pt  66 ps 2, \
+	'' i 1 using ( ($8 == 1) ? (50 **LEN_X_SEP*$5/SCALE) : 1/0 ):2:3:4 notitle with yerrorbars lt rgb "red"     pt  7  ps 0.25 lw 1, \
+	'' i 3 using ( ($8 == 1) ? (200**LEN_X_SEP*$5/SCALE) : 1/0 ):2:3:4 notitle with yerrorbars lt rgb "black"   pt  7  ps 0.25 lw 1, \
+	'' i 1 using (50 **LEN_X_SEP*$5/SCALE):2:("{/Times=15 len-\n50")  every ::5::5 with labels right offset -0.6 ,1.5  textcolor rgb "red"     notitle, \
+	'' i 3 using (200**LEN_X_SEP*$5/SCALE):2:("{/Times=15 len-\n200") every ::4::4 with labels right offset -0.75,1.25 textcolor rgb "black"   notitle, \
+	'' i 6 using                          (50 **LEN_X_SEP*$5/SCALE)        :2     notitle      with lines   lt rgb "#BF007F7F"               lw 8, \
+	'' i 8 using                          (200**LEN_X_SEP*$5/SCALE)        :2     notitle      with lines   lt rgb "#BF007F7F"              lw 8, \
+	'' i 6 using ( (strcol(8) eq "stl") ? (50 **LEN_X_SEP*$5/SCALE) : 1/0 ):2:3:4     notitle      with yerrorbars  lt rgb "#00007F7F"  pt 6     ps 0.5 lw 2 ,       \
+	'' i 8 using ( (strcol(8) eq "stl") ? (200**LEN_X_SEP*$5/SCALE) : 1/0 ):2:3:4     notitle      with yerrorbars  lt rgb "#00007F7F"  pt 6     ps 0.5 lw 2
+
+
+#	   i 6 using                          ($5/SCALE)        :2:(BAR_RELWD*($5/SCALE))     notitle               with boxes  lt rgb "grey"    , \
+#	'' i 8 using                          ($5/SCALE)        :2:(BAR_RELWD*($5/SCALE))     notitle               with boxes  lt rgb "grey"    , \
+#	'' i 6 using                          ($5/SCALE)        :($2-40):(BAR_RELWD*($5/SCALE))     notitle               with boxes  lt rgb "blue", \
+#	'' i 8 using                          ($5/SCALE)        :($2-40):(BAR_RELWD*($5/SCALE))     notitle               with boxes  lt rgb "blue", \
Index: doc/theses/mike_brooks_MMath/plots/string-allocn.py
===================================================================
--- doc/theses/mike_brooks_MMath/plots/string-allocn.py	(revision 241042418538c37dbb8067200a54e09c370946d2)
+++ doc/theses/mike_brooks_MMath/plots/string-allocn.py	(revision f858ca51b2d9f59b5d8a2ff62b2a2c3403410a4e)
@@ -31,5 +31,5 @@
             100:[-1.0, 0.1, 0.2, 0.5, 0.9],
             200:[-1.0, 0.1, 0.2, 0.5, 0.9],
-            500:[-1.0, 0.4, 0.9, 0.98]}
+            500:[-1.0, 0.2, 0.4, 0.9, 0.98]}
 
 defaultExpansions = [-1, 0.2]
@@ -56,5 +56,15 @@
 )
 
-combined['is-default'] = np.isin(combined['expansion'], defaultExpansions).astype(int)
+combined = combined.pivot_table( values=['op-duration-ns','hw_cur_req_mem(B)'], index=['corpus-meanlen-tgt', 'sut-platform', 'expansion'], aggfunc=['mean', 'min', 'max'] )
+combined = combined.reset_index()
+combined.columns = combined.columns.to_flat_index()
+
+# text = combined.to_csv(header=True, index=True, sep='\t')
+# print(text)
+
+
+combined['is-default'] = np.isin(combined[('expansion','')], defaultExpansions).astype(int)
+
+
 
 # print ('!!')
@@ -66,20 +76,27 @@
 # First, for the CFA curves
 sut = "cfa"
-sutGroup = combined.groupby('sut-platform').get_group(sut)
+sutGroup = combined.groupby(('sut-platform','')).get_group(sut)
 
-groupedSize = sutGroup.groupby('corpus-meanlen')
+groupedSize = sutGroup.groupby(('corpus-meanlen-tgt',''))
 
 for sz, szgroup in groupedSize:
 
     if sz in favSizes.keys():
-            szgroup_sorted = szgroup.sort_values(by='expansion')
+            szgroup_sorted = szgroup.sort_values(by=('expansion',''))
 
             print('"{sut}, len={len}"'.format(sut=sut, len=sz))
             # print(szgroup_sorted)  ##
             # print(szgroup_sorted['expansion'], 'isin', favSizes[sz]) ##
-            favoured = szgroup_sorted.loc[szgroup_sorted['expansion'].isin(favSizes[sz])]
+            favoured = szgroup_sorted.loc[szgroup_sorted[('expansion','')].isin(favSizes[sz])]
             # print('!') ##
             # print(favoured) ##
-            text = favoured[['expansion', 'op-duration-ns', 'hw_cur_req_mem(B)', 'is-default']].to_csv(header=False, index=False, sep='\t')
+            text = favoured[[('expansion',''),
+                             ('mean','op-duration-ns'),
+                             ('min','op-duration-ns'),
+                             ('max','op-duration-ns'),
+                             ('mean', 'hw_cur_req_mem(B)'),
+                             ('min', 'hw_cur_req_mem(B)'),
+                             ('max', 'hw_cur_req_mem(B)'),
+                             'is-default']].to_csv(header=False, index=False, sep='\t')
             print(text)
             print()
@@ -89,9 +106,16 @@
 atDefaults = combined.groupby('is-default').get_group(1)
 
-for sz, szgroup in atDefaults.groupby('corpus-meanlen'):
+for sz, szgroup in atDefaults.groupby(('corpus-meanlen-tgt','')):
 
     if sz in favSizes.keys():
             print(sz)
-            text = szgroup[['expansion', 'op-duration-ns', 'hw_cur_req_mem(B)', 'sut-platform']].to_csv(header=False, index=False, sep='\t')
+            text = szgroup[[('expansion',''),
+                            ('mean','op-duration-ns'),
+                            ('min','op-duration-ns'),
+                            ('max','op-duration-ns'),
+                            ('mean', 'hw_cur_req_mem(B)'),
+                            ('min', 'hw_cur_req_mem(B)'),
+                            ('max', 'hw_cur_req_mem(B)'),
+                            ('sut-platform','')]].to_csv(header=False, index=False, sep='\t')
             print(text)
             print()
Index: doc/theses/mike_brooks_MMath/plots/string-pbv-fixcorp.py
===================================================================
--- doc/theses/mike_brooks_MMath/plots/string-pbv-fixcorp.py	(revision 241042418538c37dbb8067200a54e09c370946d2)
+++ doc/theses/mike_brooks_MMath/plots/string-pbv-fixcorp.py	(revision f858ca51b2d9f59b5d8a2ff62b2a2c3403410a4e)
@@ -26,9 +26,9 @@
 
 
-# Filter operation=pbv, corpus=1-*-1
+# Filter operation=pbv, corpus=100-*-*+*+l1
 
 timings = timings.groupby('operation').get_group('pbv')
-timings = timings.groupby('corpus-nstrs').get_group(1)
-timings = timings.groupby('corpus-runid').get_group(1)
+timings = timings.groupby('corpus-nstrs-tgt').get_group(100)
+timings = timings.groupby('corpus-offset-instr').get_group('l1')
 
 
@@ -41,8 +41,8 @@
     if sut in prettyFieldNames:
 
-        sgroup_sorted = sgroup.sort_values(by='corpus-meanlen')
+        sgroup_sorted = sgroup.sort_values(by='corpusMeanLenCharsAct')
 
         print('"{header}"'.format(header=prettyFieldNames[sut]))
-        text = sgroup_sorted[['corpus-meanlen', 'op-duration-ns']].to_csv(header=False, index=False, sep='\t')
+        text = sgroup_sorted[['corpusMeanLenCharsAct', 'op-duration-ns']].to_csv(header=False, index=False, sep='\t')
         print(text)
         print()
Index: doc/theses/mike_brooks_MMath/plots/string-pbv-varcorp.py
===================================================================
--- doc/theses/mike_brooks_MMath/plots/string-pbv-varcorp.py	(revision 241042418538c37dbb8067200a54e09c370946d2)
+++ doc/theses/mike_brooks_MMath/plots/string-pbv-varcorp.py	(revision f858ca51b2d9f59b5d8a2ff62b2a2c3403410a4e)
@@ -26,9 +26,9 @@
 
 
-# Filter operation=pbv, corpus=100-*-1
+# Filter operation=pbv, corpus=100-*-*+*+t0
 
 timings = timings.groupby('operation').get_group('pbv')
-timings = timings.groupby('corpus-nstrs').get_group(100)
-timings = timings.groupby('corpus-runid').get_group(1)
+timings = timings.groupby('corpus-nstrs-tgt').get_group(100)
+timings = timings.groupby('corpus-offset-instr').get_group('t0')
 
 
@@ -41,8 +41,8 @@
     if sut in prettyFieldNames:
 
-        sgroup_sorted = sgroup.sort_values(by='corpus-meanlen')
+        sgroup_sorted = sgroup.sort_values(by='corpusMeanLenCharsAct')
 
         print('"{header}"'.format(header=prettyFieldNames[sut]))
-        text = sgroup_sorted[['corpus-meanlen', 'op-duration-ns']].to_csv(header=False, index=False, sep='\t')
+        text = sgroup_sorted[['corpusMeanLenCharsAct', 'op-duration-ns']].to_csv(header=False, index=False, sep='\t')
         print(text)
         print()
Index: doc/theses/mike_brooks_MMath/plots/string-pbv.gp
===================================================================
--- doc/theses/mike_brooks_MMath/plots/string-pbv.gp	(revision 241042418538c37dbb8067200a54e09c370946d2)
+++ doc/theses/mike_brooks_MMath/plots/string-pbv.gp	(revision f858ca51b2d9f59b5d8a2ff62b2a2c3403410a4e)
@@ -25,12 +25,12 @@
 set linetype 4 dashtype 2
 plot INDIR."/plot-string-pbv-varcorp.dat" \
-	   i 0 using 1:2 title columnheader(1) with linespoints lt rgb "red"	pt  3  ps 1 lw 1, \
-	'' i 1 using 1:2 title columnheader(1) with linespoints lt rgb "blue"	pt  6  ps 1 lw 1
+	   i 0 using 1:2 title columnheader(1) with points lt rgb "red"	 pt  3  ps 1, \
+	'' i 1 using 1:2 title columnheader(1) with points lt rgb "blue" pt  6  ps 1
 
 set xlabel "String length passed, fixed"
 set ylabel
 plot INDIR."/plot-string-pbv-fixcorp.dat"  \
-	   i 0 using 1:2 title columnheader(1) with linespoints lt rgb "red"	pt  3  ps 1 lw 1, \
-	'' i 1 using 1:2 title columnheader(1) with linespoints lt rgb "blue"	pt  6  ps 1 lw 1
+	   i 0 using 1:2 title columnheader(1) with points lt rgb "red"  pt  3  ps 1, \
+	'' i 1 using 1:2 title columnheader(1) with points lt rgb "blue" pt  6  ps 1
 
 unset multiplot
Index: doc/theses/mike_brooks_MMath/plots/string-peq-cppemu.gp
===================================================================
--- doc/theses/mike_brooks_MMath/plots/string-peq-cppemu.gp	(revision 241042418538c37dbb8067200a54e09c370946d2)
+++ doc/theses/mike_brooks_MMath/plots/string-peq-cppemu.gp	(revision f858ca51b2d9f59b5d8a2ff62b2a2c3403410a4e)
@@ -20,6 +20,6 @@
 set linetype 4 dashtype 2
 plot INDIR."/plot-string-peq-cppemu.dat" \
-	   i 0 using 1:2 title columnheader(1) with linespoints lt rgb "red"	pt  2  ps 1 lw 1, \
-	'' i 1 using 1:2 title columnheader(1) with linespoints lt rgb "red"	pt  3  ps 1 lw 1, \
-	'' i 2 using 1:2 title columnheader(1) with linespoints lt rgb "blue"	pt  6  ps 1 lw 1, \
-	'' i 3  using 1:2 title columnheader(1) with linespoints lt rgb "blue"	pt  8  ps 1 lw 1
+	   i 0 using 1:2 title columnheader(1)  with points lt rgb "red"  pt  2  ps 1, \
+	'' i 1 using 1:2 title columnheader(1)  with points lt rgb "red"  pt  1  ps 1, \
+	'' i 2 using 1:2 title columnheader(1)  with points lt rgb "blue" pt  6  ps 1, \
+	'' i 3  using 1:2 title columnheader(1) with points lt rgb "blue" pt  8  ps 1
Index: doc/theses/mike_brooks_MMath/plots/string-peq-cppemu.py
===================================================================
--- doc/theses/mike_brooks_MMath/plots/string-peq-cppemu.py	(revision 241042418538c37dbb8067200a54e09c370946d2)
+++ doc/theses/mike_brooks_MMath/plots/string-peq-cppemu.py	(revision f858ca51b2d9f59b5d8a2ff62b2a2c3403410a4e)
@@ -27,9 +27,11 @@
 timings = loadParseTimingData('result-append-pbv.csv')
 
-# Filter operation=peq, corpus=100-*-1
+# Filter operation=peq, corpus=100-*-*+*+t0
 
 timings = timings.groupby('operation').get_group('peq')
-timings = timings.groupby('corpus-nstrs').get_group(100)
-timings = timings.groupby('corpus-runid').get_group(1)
+timings = timings.groupby('corpus-nstrs-tgt').get_group(100)
+timings = timings.groupby('corpus-offset-instr').get_group('t0')
+
+
 
 # Emit in groups
@@ -41,8 +43,8 @@
     if sut in prettyFieldNames:
 
-        sgroup_sorted = sgroup.sort_values(by='corpus-meanlen')
+        sgroup_sorted = sgroup.sort_values(by='corpusMeanLenCharsAct')
 
         print('"{header}"'.format(header=prettyFieldNames[sut]))
-        text = sgroup_sorted[['corpus-meanlen', 'op-duration-ns']].to_csv(header=False, index=False, sep='\t')
+        text = sgroup_sorted[['corpusMeanLenCharsAct', 'op-duration-ns']].to_csv(header=False, index=False, sep='\t')
         print(text)
         print()
Index: doc/theses/mike_brooks_MMath/plots/string-peq-sharing.gp
===================================================================
--- doc/theses/mike_brooks_MMath/plots/string-peq-sharing.gp	(revision 241042418538c37dbb8067200a54e09c370946d2)
+++ doc/theses/mike_brooks_MMath/plots/string-peq-sharing.gp	(revision f858ca51b2d9f59b5d8a2ff62b2a2c3403410a4e)
@@ -20,6 +20,6 @@
 set linetype 4 dashtype 2
 plot INDIR."/plot-string-peq-sharing.dat" \
-	   i 0 using 1:2 title columnheader(1) with linespoints lt rgb "red"	pt  2  ps 1 lw 1, \
-	'' i 1 using 1:2 title columnheader(1) with linespoints lt rgb "red"	pt  3  ps 1 lw 1, \
-	'' i 2 using 1:2 title columnheader(1) with linespoints lt rgb "blue"	pt  6  ps 1 lw 1, \
-	'' i 3  using 1:2 title columnheader(1) with linespoints lt rgb "blue"	pt  8  ps 1 lw 1
+	   i 0 using 1:2 title columnheader(1) with points lt rgb "red"	 pt  2  ps 1, \
+	'' i 1 using 1:2 title columnheader(1) with points lt rgb "red"	 pt  1  ps 1, \
+	'' i 2 using 1:2 title columnheader(1) with points lt rgb "blue" pt  6  ps 1, \
+	'' i 3 using 1:2 title columnheader(1) with points lt rgb "blue" pt  8  ps 1
Index: doc/theses/mike_brooks_MMath/plots/string-peq-sharing.py
===================================================================
--- doc/theses/mike_brooks_MMath/plots/string-peq-sharing.py	(revision 241042418538c37dbb8067200a54e09c370946d2)
+++ doc/theses/mike_brooks_MMath/plots/string-peq-sharing.py	(revision f858ca51b2d9f59b5d8a2ff62b2a2c3403410a4e)
@@ -28,9 +28,9 @@
 
 
-# Filter operation=peq, corpus=100-*-1
+# Filter operation=peq, corpus=100-*-*+*+t0
 
 timings = timings.groupby('operation').get_group('peq')
-timings = timings.groupby('corpus-nstrs').get_group(100)
-timings = timings.groupby('corpus-runid').get_group(1)
+timings = timings.groupby('corpus-nstrs-tgt').get_group(100)
+timings = timings.groupby('corpus-offset-instr').get_group('t0')
 
 
@@ -43,8 +43,8 @@
     if sut in prettyFieldNames:
 
-        sgroup_sorted = sgroup.sort_values(by='corpus-meanlen')
+        sgroup_sorted = sgroup.sort_values(by='corpusMeanLenCharsAct')
 
         print('"{header}"'.format(header=prettyFieldNames[sut]))
-        text = sgroup_sorted[['corpus-meanlen', 'op-duration-ns']].to_csv(header=False, index=False, sep='\t')
+        text = sgroup_sorted[['corpusMeanLenCharsAct', 'op-duration-ns']].to_csv(header=False, index=False, sep='\t')
         print(text)
         print()
Index: doc/theses/mike_brooks_MMath/plots/string-pta-sharing.gp
===================================================================
--- doc/theses/mike_brooks_MMath/plots/string-pta-sharing.gp	(revision 241042418538c37dbb8067200a54e09c370946d2)
+++ doc/theses/mike_brooks_MMath/plots/string-pta-sharing.gp	(revision f858ca51b2d9f59b5d8a2ff62b2a2c3403410a4e)
@@ -19,6 +19,6 @@
 #show colornames
 plot INDIR."/plot-string-pta-sharing.dat" \
-	   i 0 using 1:2 title columnheader(1) with linespoints lt rgb "red"	pt  2  ps 1 lw 1, \
-	'' i 1 using 1:2 title columnheader(1) with linespoints lt rgb "dark-green" pt  4  ps 1 lw 1, \
-	'' i 2 using 1:2 title columnheader(1) with linespoints lt rgb "blue"	pt  6  ps 1 lw 1, \
-	'' i 3  using 1:2 title columnheader(1) with linespoints lt rgb "dark-green" pt  12  ps 1 lw 1
+	   i 0 using 1:2 title columnheader(1) with points lt rgb "red"        pt  2   ps 1, \
+	'' i 1 using 1:2 title columnheader(1) with points lt rgb "dark-green" pt  4   ps 1, \
+	'' i 2 using 1:2 title columnheader(1) with points lt rgb "blue"       pt  6   ps 1, \
+	'' i 3 using 1:2 title columnheader(1) with points lt rgb "dark-green" pt  12  ps 1
Index: doc/theses/mike_brooks_MMath/plots/string-pta-sharing.py
===================================================================
--- doc/theses/mike_brooks_MMath/plots/string-pta-sharing.py	(revision 241042418538c37dbb8067200a54e09c370946d2)
+++ doc/theses/mike_brooks_MMath/plots/string-pta-sharing.py	(revision f858ca51b2d9f59b5d8a2ff62b2a2c3403410a4e)
@@ -32,8 +32,8 @@
 
 
-# Filter corpus=100-*-1
+# Filter corpus=100-*-1, corpus=100-*-*+*+t0
 
-timings = timings.groupby('corpus-nstrs').get_group(100)
-timings = timings.groupby('corpus-runid').get_group(1)
+timings = timings.groupby('corpus-nstrs-tgt').get_group(100)
+timings = timings.groupby('corpus-offset-instr').get_group('t0')
 
 # Emit in groups
@@ -50,8 +50,8 @@
             if sut in opPretty:
 
-                sgroup_sorted = tgtOpTimings.sort_values(by='corpus-meanlen')
+                sgroup_sorted = tgtOpTimings.sort_values(by='corpusMeanLenCharsAct')
 
                 print('"{header}"'.format(header=opPretty[sut]))
-                text = sgroup_sorted[['corpus-meanlen', 'op-duration-ns']].to_csv(header=False, index=False, sep='\t')
+                text = sgroup_sorted[['corpusMeanLenCharsAct', 'op-duration-ns']].to_csv(header=False, index=False, sep='\t')
                 print(text)
                 print()
