diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-05-16 00:15:04 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-05-16 00:15:04 +0200 |
commit | b55577d0998160c0174e250b542016ecd6ca9056 (patch) | |
tree | 27093212d5ca3e6ffe4ae434c3ec094233ed37ba /tex/context/base/s-youless.mkiv | |
parent | 624cbb5da392e9403984dd1cf368c0d408b1c2a8 (diff) | |
download | context-b55577d0998160c0174e250b542016ecd6ca9056.tar.gz |
2015-05-15 23:06:00
Diffstat (limited to 'tex/context/base/s-youless.mkiv')
-rw-r--r-- | tex/context/base/s-youless.mkiv | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tex/context/base/s-youless.mkiv b/tex/context/base/s-youless.mkiv index 247eb5f64..e15973b9c 100644 --- a/tex/context/base/s-youless.mkiv +++ b/tex/context/base/s-youless.mkiv @@ -59,9 +59,10 @@ for y=year,year do - local year = years[y] - local scale = 20 - local mark = 3 + local year = years[y] + local scale = 20 + local mark = 3 + local maxwatt = specification.maxwatt or year.maxwatt for m=1,12 do local month = year.months[m] @@ -69,7 +70,7 @@ context.startMPpage { offset = "10pt" } context("linecap := butt; pickup pencircle scaled .5") - for i=0,(math.div(year.maxwatt,1000)+1)*1000,100 do + for i=0,(math.div(maxwatt,1000)+1)*1000,100 do context("draw (%s,%s) -- (%s,%s) withcolor .6white ;",0,i/scale,31 * 24,i/scale) end @@ -123,7 +124,7 @@ context("draw (%s,%s) -- (%s,%s) withcolor darkgray ; ",xoffset,0,xoffset,-10) end - local max = (math.div(year.maxwatt,1000)+1) + local max = (math.div(maxwatt,1000)+1) for i=0,max*1000,1000 do context([[draw textext.lft("%s") shifted (%s,%s) ; ]],i,-10,i/scale) |