Commit e2ec8964 authored by gijs's avatar gijs

Proportional days in exported timeline

parent 2d9f648d
......@@ -56,7 +56,7 @@ def getloopsize (days):
elif len(days) == 2:
return 60
else:
return 70
return 85
def daterange(start_date, end_date):
for n in range(int((end_date - start_date).days)):
......@@ -325,7 +325,8 @@ beginfig(1);
for day in loop['days']:
mp += "\n% --- Day {}\n".format(d)
# events = len(day)
events = len(day)
# for e in range(1, events+1):
# # Construct paths for the events
# et = e/(2*events+2.0) + .25
......@@ -340,7 +341,7 @@ beginfig(1);
else:
dt = 0.35+((d-1.0) / max(1, (days-1.0)))*0.35
mp += "l[{0}][{1}]t = {2};\n".format(l, d, dt)
mp += "l[{0}][{1}]p = loop({2});\n".format(l, d, getDaySize(0))
mp += "l[{0}][{1}]p = loop({2});\n".format(l, d, getDaySize(events))
# if events > 0:
# mp += "l[{0}][{1}]p = insert(loop({3}), l[{0}.{1}], {2});\n".format(l,d, ', '.join([str(i) for i in range(1, events+1)]), getDaySize(events))
# else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment