Skip to content

Commit 25cb6fb

Browse files
committed
updated animation plots
1 parent 8fce881 commit 25cb6fb

8 files changed

+19
-10
lines changed

plot-template_anim.gnu

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
set terminal pngcairo size 1280,900 dashed
1+
set terminal pngcairo size 1280,900
22
set output 'compression-anim-CATEGORY.png'
33

4-
y1 = 0.0
5-
y2 = 3.0
4+
y1 = LOWER
5+
y2 = UPPER
66
x1 = 0
77
x2 = NUMBER
88

@@ -11,14 +11,14 @@ set grid ytics back
1111
set grid xtics back
1212
set key bottom right
1313

14-
set xlabel "images"
15-
set ylabel "relative size of compressed file (smaller is better)"
16-
set title "Image corpus: CATEGORY (NUMBER images)"
14+
set xlabel "images, sorted for each algorithm from best to worst relative compression"
15+
set ylabel "relative size, compared to APNG (apngasm 2.7)"
16+
set title "Lossless animation compression comparison, corpus: CATEGORY (NUMBER images)"
1717

1818

1919
plot [x1:x2][y1:y2]\
2020
'<sort -n results/*anim.GIF.CATEGORY' using ($0):($1) with lines lw 3 lc rgb "#000088" lt 1 title "GIF",\
21-
'<sort -n results/*anim.APNG.CATEGORY' using ($0):($1) with lines lw 2 lc rgb "#00FF00" lt 1 title "APNG (reference)",\
21+
'<sort -n results/*anim.APNG.CATEGORY' using ($0):($1) with lines lw 2 lc rgb "#00FF00" lt 1 title "APNG",\
2222
'<sort -n results/*anim.MNG.CATEGORY' using ($0):($1) with lines lw 1 lc rgb "#008800" lt 1 title "MNG",\
2323
'<sort -n results/*anim.BPG.CATEGORY' using ($0):($1) with lines lw 1 lc rgb "#AA00AA" lt 1 title "BPG",\
2424
'<sort -n results/*anim.WebP.CATEGORY' using ($0):($1) with lines lw 3 lc rgb "#00AAAA" lt 1 title "WebP",\

plot-template_still_logscale.gnu

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ rm = 0.95
88
gap = 0.02
99
size = 0.8
1010
kk = 0.8 # relative height of bottom plot
11-
y1 = LOWER; y2 = 1.1; y3 = 1.1; y4 = UPPER
11+
y1 = LOWER; y2 = 1.2; y3 = 1.2; y4 = UPPER
1212
x1 = 0
1313
x2 = NUMBER
1414

plot_benchmarks_anim

+10-1
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,21 @@ do
1111
if [ -e $PREFIX_ANIM.FLIF.$TYPE ]
1212
then
1313
echo "Plotting $TYPE"
14-
perl -p -e "s/CATEGORY/$TYPE/g; s/NUMBER/$(wc -l $PREFIX_ANIM.FLIF.$TYPE | cut -f 1 -d " ")/g" plot-template_anim.gnu > tmp/plot.gnu
14+
LOWER=$(sort -n $PREFIX_ANIM.*.$TYPE | head -n 1 | cut -f 1 -d " ")
15+
UPPER=$(sort -n $PREFIX_ANIM.*.$TYPE | tail -n 1 | cut -f 1 -d " ")
16+
# echo "Interval $LOWER..$UPPER"
17+
LOWER=$(echo "$LOWER - $LOWER % 0.1 " | bc)
18+
UPPER=$(echo "$UPPER - $UPPER % 0.01 " | bc)
19+
# echo "Interval $LOWER..$UPPER"
20+
if [ $(echo "$LOWER < 0.7" | bc) -eq 1 ]; then LOWER="0"; fi
21+
if [ $(echo "$UPPER > 2.5" | bc) -eq 1 ]; then UPPER="2.5"; fi
22+
perl -p -e "s/CATEGORY/$TYPE/g; s/LOWER/$LOWER/g; s/UPPER/$UPPER/g; s/NUMBER/$(wc -l $PREFIX_ANIM.FLIF.$TYPE | cut -f 1 -d " ")/g" plot-template_anim.gnu > tmp/plot.gnu
1523
gnuplot tmp/plot.gnu
1624
else
1725
echo "Skipping $TYPE"
1826
fi
1927
done
2028

29+
2130
perl -p -e "s/CATEGORY/\*/g; s/\*.png/all-anim.png/; s/NUMBER/$(cat $PREFIX_ANIM.FLIF.* |wc -l)/" plot-template_anim.gnu > tmp/plot.gnu
2231
gnuplot tmp/plot.gnu

plot_benchmarks_still

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ do
1414
LOWER=$(sort -n $PREFIX_STILL.*.$TYPE | head -n 1 | cut -f 1 -d " ")
1515
UPPER=$(sort -n $PREFIX_STILL.*.$TYPE | tail -n 1 | cut -f 1 -d " ")
1616
# echo "Interval $LOWER..$UPPER"
17-
LOWER=$(echo "$LOWER - $LOWER % 0.1 - 0.1" | bc)
17+
LOWER=$(echo "$LOWER - $LOWER % 0.1 " | bc)
1818
UPPER=$(echo "$UPPER - $UPPER % 0.01 " | bc)
1919
# echo "Interval $LOWER..$UPPER"
2020
LOGSCALE=""

plots/compression-anim-apng.png

-11.1 KB
Loading
6.17 KB
Loading

plots/compression-anim-game-braid.png

47.5 KB
Loading
-1016 Bytes
Loading

0 commit comments

Comments
 (0)