Changeset e0350e0 for doc/theses/mike_brooks_MMath/plots/string-allocn.gp
- Timestamp:
- Jun 4, 2025, 1:43:34 PM (4 months ago)
- Branches:
- master
- Children:
- f858ca5
- Parents:
- c8bdbaf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/mike_brooks_MMath/plots/string-allocn.gp
rc8bdbaf re0350e0 5 5 INDIR="build" 6 6 OUTDIR="build" 7 SRCDIR="plots" 7 8 8 9 SCALE=1024 … … 11 12 set macros 12 13 set output OUTDIR."/plot-string-allocn.pdf" 13 set multiplot layout 1, 3 ; 14 set key outside top center horizontal 14 set multiplot layout 1, 2 ; 15 15 set grid 16 16 17 # common to only first two graphs18 set logscale x 219 #set mxtics 3 # 3 steps within each doubling (e.g. 3 steps of of 32 between 32 and 128 => tick on 32s in there)20 set xlabel "Heap Used (B)"21 set logscale y 1022 17 23 18 # … … 25 20 # 26 21 22 #set errorbars dashtype '.' 23 24 set logscale x 2 25 set xlabel "Heap Used (B)" 26 set logscale y 10 27 set key outside top center 28 27 29 set ylabel "Duration (ns)" offset 2,0 28 set yrange[ 35:125]29 set ytics add (40, 50, 60, 70, 80, 90, 110, 120 )30 set yrange[40:150] 31 set ytics add (40, 50, 60, 70, 80, 90, 110, 120, 130, 140, 150) 30 32 31 set xrange[32: 4096]33 set xrange[32:8192] 32 34 set xtics rotate by -90 33 35 set xtics ("" 32, "64 k" 64, "" 128, "256 k" 256, "" 512, "1 M" 1024, "" 2048, "4 M" 4096) … … 35 37 # First each curve, then each default-expansion point 36 38 plot INDIR."/plot-string-allocn.dat" \ 37 i 0 using ($3/SCALE):2 title columnheader(1) with linespoints lt rgb "blue" pt 2 ps 1 lw 1, \ 38 '' i 1 using ($3/SCALE):2 title columnheader(1) with linespoints lt rgb "red" pt 3 ps 1 lw 1, \ 39 '' i 2 using ($3/SCALE):2 title columnheader(1) with linespoints lt rgb "brown" pt 8 ps 1 lw 1, \ 40 '' i 3 using ($3/SCALE):2 title columnheader(1) with linespoints lt rgb "black" pt 10 ps 1 lw 1, \ 41 '' i 4 using ($3/SCALE):2 title columnheader(1) with linespoints lt rgb "magenta" pt 12 ps 1 lw 1, \ 42 '' i 0 using ( ($4 == 1) ? ($3/SCALE) : 1/0 ):2 notitle with points lt rgb "blue" pt 66 ps 2, \ 43 '' i 1 using ( ($4 == 1) ? ($3/SCALE) : 1/0 ):2 notitle with points lt rgb "red" pt 66 ps 2, \ 44 '' i 2 using ( ($4 == 1) ? ($3/SCALE) : 1/0 ):2 notitle with points lt rgb "brown" pt 66 ps 2, \ 45 '' i 3 using ( ($4 == 1) ? ($3/SCALE) : 1/0 ):2 notitle with points lt rgb "black" pt 66 ps 2, \ 46 '' i 4 using ( ($4 == 1) ? ($3/SCALE) : 1/0 ):2 notitle with points lt rgb "magenta" pt 66 ps 2 39 i 0 using ($5/SCALE):2 notitle with lines lt rgb "blue" dt '.' lw 2, \ 40 '' i 1 using ($5/SCALE):2 notitle with lines lt rgb "red" dt '.' lw 2, \ 41 '' i 2 using ($5/SCALE):2 notitle with lines lt rgb "brown" dt '.' lw 2, \ 42 '' i 3 using ($5/SCALE):2 title "tuning contour" with lines lt rgb "black" dt '.' lw 2, \ 43 '' i 4 using ($5/SCALE):2 notitle with lines lt rgb "magenta" dt '.' lw 2, \ 44 '' i 0 using ($5/SCALE):2:3:4 notitle with yerrorbars lt rgb "blue" pt 7 ps 0.25 lw 1, \ 45 '' i 1 using ($5/SCALE):2:3:4 notitle with yerrorbars lt rgb "red" pt 7 ps 0.25 lw 1, \ 46 '' i 2 using ($5/SCALE):2:3:4 notitle with yerrorbars lt rgb "brown" pt 7 ps 0.25 lw 1, \ 47 '' i 3 using ($5/SCALE):2:3:4 notitle with yerrorbars lt rgb "black" pt 7 ps 0.25 lw 1, \ 48 '' i 4 using ($5/SCALE):2:3:4 notitle with yerrorbars lt rgb "magenta" pt 7 ps 0.25 lw 1, \ 49 '' i 0 using ( ($8 == 1) ? ($5/SCALE) : 1/0 ):2 notitle with points lt rgb "blue" pt 66 ps 2, \ 50 '' i 1 using ( ($8 == 1) ? ($5/SCALE) : 1/0 ):2 notitle with points lt rgb "red" pt 66 ps 2, \ 51 '' i 2 using ( ($8 == 1) ? ($5/SCALE) : 1/0 ):2 notitle with points lt rgb "brown" pt 66 ps 2, \ 52 '' i 3 using ( ($8 == 1) ? ($5/SCALE) : 1/0 ):2 title "default tuning" \ 53 with points lt rgb "black" pt 66 ps 2, \ 54 '' i 4 using ( ($8 == 1) ? ($5/SCALE) : 1/0 ):2 notitle with points lt rgb "magenta" pt 66 ps 2, \ 55 '' 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, \ 56 '' 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, \ 57 '' 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, \ 58 '' 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, \ 59 '' 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, \ 60 '' i 5 using ($5/SCALE) :2 notitle with lines lt rgb "#BF007F7F" lw 8, \ 61 '' i 6 using ($5/SCALE) :2 notitle with lines lt rgb "#BF007F7F" lw 8, \ 62 '' i 7 using ($5/SCALE) :2 notitle with lines lt rgb "#BF007F7F" lw 8, \ 63 '' i 8 using ($5/SCALE) :2 title "tradeoff" with lines lt rgb "#BF007F7F" lw 8, \ 64 '' i 9 using ($5/SCALE) :2 notitle with lines lt rgb "#BF007F7F" lw 8, \ 65 '' 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 , \ 66 '' 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 , \ 67 '' 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 , \ 68 '' 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 , \ 69 '' 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 70 47 71 48 72 unset ylabel 73 unset xlabel 49 74 50 75 unset xtics … … 53 78 unset xrange 54 79 55 56 #57 # STL comparison58 #59 60 61 set yrange[40:85]62 set ytics add (40, 45, 50, 55, 60, 65, 70, 75, 80, 85)63 set mytics 90 # 90 steps within each decade (e.g. 90 steps of of 1 between 10 and 100 => tick on 1s in there)64 65 set xrange[64:4096]66 set xtics rotate by -9067 set xtics ("64 k" 64, "128 k" 128, "256 k" 256, "512 k" 512, "1 M" 1024, "2 M" 2048, "4 M" 4096)68 69 # skullduggeries:70 # hardcoding chunk index and assuming data in the chunk (by hardcoding only the stl series title)71 # series order is meaningless but important: achieves z-order readability and legend order acceptability72 73 plot INDIR."/plot-string-allocn.dat" \74 i 8 using ($3/SCALE) :2 title "tradeoff" with lines lt rgb "#77000000" dt (2,2) lw 8, \75 '' i 1 using ($3/SCALE) :2 title columnheader(1) with linespoints lt rgb "red" pt 3 ps 1 lw 1, \76 '' i 6 using ( (strcol(4) eq "cfa") ? ($3/SCALE) : 1/0 ):2 notitle with points lt rgb "red" pt 66 ps 2, \77 '' i 6 using ($3/SCALE) :2 notitle with lines lt rgb "#77000000" dt (2,2) lw 8, \78 '' 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, \79 '' i 3 using ($3/SCALE) :2 title columnheader(1) with linespoints lt rgb "black" pt 10 ps 1 lw 1, \80 '' 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, \81 '' i 8 using ( (strcol(4) eq "cfa") ? ($3/SCALE) : 1/0 ):2 notitle with points lt rgb "black" pt 66 ps 282 83 84 unset mytics85 unset ytics86 unset yrange87 unset xrange88 89 90 91 # common to first two graphs92 80 unset logscale 93 81 unset xlabel … … 98 86 # 99 87 100 set style data histogram 88 set key outside top center vertical maxrows 3 89 90 set logscale x 2 91 #set mxtics 3 # 3 steps within each doubling (e.g. 3 steps of of 32 between 32 and 128 => tick on 32s in there) 92 93 set yrange[0:105] 101 94 set ytics auto 102 set style histogram clustered gap 1 rowstacked103 set style fill solid border -1104 set boxwidth 0.8105 set xtics rotate by -45106 95 107 plot for [col=3:8] \ 108 INDIR.'/plot-string-allocn-attrib.dat' using col:xticlabels(stringcolumn(2).", len=".stringcolumn(1)) index 0 title columnheader(col) 96 set xrange[2.0e4:3e7] 97 # set xtics rotate by -90 98 # set xtics ("" 32, "64 k" 64, "" 128, "256 k" 256, "" 512, "1 M" 1024, "" 2048, "4 M" 4096) 99 100 set style fill solid 1.0 101 102 BAR_RELWD = 0.5 103 BAR_XSHIFT = (1+BAR_RELWD)**(-0.55) 104 LEN_X_SEP = 1.7 105 106 # get segment draw order (front to back) from metadata file 107 meta = system('cat '.SRCDIR.'/string-allocn-attrib-meta.dat') 108 STATS_words = words(meta) 109 array STATS_word[STATS_words] 110 do for [i=1:STATS_words] { 111 STATS_word[i] = word(meta, i) 112 } 113 114 115 116 plot \ 117 for [i=STATS_words:1:-1] \ 118 INDIR.'/plot-string-allocn-attrib.dat' \ 119 using (stringcolumn("category") eq STATS_word[i] ? (BAR_XSHIFT*$1**LEN_X_SEP*$3/SCALE) : 1/0): \ 120 (stringcolumn("category") eq STATS_word[i] ? ($5 + $8) : 1/0): \ 121 (stringcolumn("category") eq STATS_word[i] ? (BAR_RELWD*(BAR_XSHIFT*$1**LEN_X_SEP*$3/SCALE)) : 1/0) \ 122 with boxes ls i title STATS_word[i], \ 123 INDIR."/plot-string-allocn.dat" \ 124 i 1 using (50 **LEN_X_SEP*$5/SCALE):2 notitle with lines lt rgb "red" dt '.' lw 2, \ 125 '' i 3 using (200**LEN_X_SEP*$5/SCALE):2 notitle with lines lt rgb "black" dt '.' lw 2, \ 126 '' i 1 using ( ($8 == 1) ? (50 **LEN_X_SEP*$5/SCALE) : 1/0 ):2 notitle with points lt rgb "red" pt 66 ps 2, \ 127 '' i 3 using ( ($8 == 1) ? (200**LEN_X_SEP*$5/SCALE) : 1/0 ):2 notitle with points lt rgb "black" pt 66 ps 2, \ 128 '' 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, \ 129 '' 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, \ 130 '' 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, \ 131 '' 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, \ 132 '' i 6 using (50 **LEN_X_SEP*$5/SCALE) :2 notitle with lines lt rgb "#BF007F7F" lw 8, \ 133 '' i 8 using (200**LEN_X_SEP*$5/SCALE) :2 notitle with lines lt rgb "#BF007F7F" lw 8, \ 134 '' 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 , \ 135 '' 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 136 137 138 # i 6 using ($5/SCALE) :2:(BAR_RELWD*($5/SCALE)) notitle with boxes lt rgb "grey" , \ 139 # '' i 8 using ($5/SCALE) :2:(BAR_RELWD*($5/SCALE)) notitle with boxes lt rgb "grey" , \ 140 # '' i 6 using ($5/SCALE) :($2-40):(BAR_RELWD*($5/SCALE)) notitle with boxes lt rgb "blue", \ 141 # '' i 8 using ($5/SCALE) :($2-40):(BAR_RELWD*($5/SCALE)) notitle with boxes lt rgb "blue", \
Note:
See TracChangeset
for help on using the changeset viewer.