dodb.cr/paper/legend.grap

55 lines
1.0 KiB
Plaintext

define boite {
xleft = $1
xright = $2
yup = $3
ydown = $4
line from xleft,ydown to xright,ydown
line from xleft,yup to xright,yup
line from xleft,yup to xleft,ydown
line from xright,yup to xright,ydown
}
define legend {
xleft = $1
xright = $2
yup = $3
ydown = $4
diffx = xright - xleft
diffy = yup - ydown
hdiff = diffy/5.7
cy = yup - (diffy/6)
cx = (diffx/20) + xleft
lstartx = cx
lendx = cx + diffx/8
tstartx = lendx + diffx/20
.ps -2
.gcolor red
line from lstartx,cy to lendx,cy
.gcolor
"RAM only" ljust at tstartx,cy
cy = cy - hdiff
line from lstartx,cy to lendx,cy
"Cached db and index" ljust at tstartx,cy
cy = cy - hdiff
.gcolor pink
line from lstartx,cy to lendx,cy
.gcolor
"FIFO db and cached index" ljust at tstartx,cy
cy = cy - hdiff
.gcolor blue
line from lstartx,cy to lendx,cy
.gcolor
"Uncached db, cached index" ljust at tstartx,cy
cy = cy - hdiff
.gcolor green
line from lstartx,cy to lendx,cy
.gcolor
"Uncached db and index" ljust at tstartx,cy
.ps +2
}