grandrew / plotti.co

plottico - live plot micorservice that just works

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

math domain error in axis_max

grandrew opened this issue · comments

GENERATE_ERROR
Traceback (most recent call last):
  File "./evsvg.py", line 183, in plotwh
    max_val, valueMid, timeMid, secondsMid, neg_val, msg, points = generate_points(value_cache[hashstr])
  File "./evsvg.py", line 123, in generate_points
    max_val = axis_max(max_val,neg_val)
  File "./evsvg.py", line 78, in axis_max
    max_y = (Math.floor(dig/Math.pow(10,Math.floor(Math.log10(dig))))+1)*Math.pow(10,Math.floor(Math.log10(dig)));
ValueError: math domain error

the problem is when all the data in plot are zeros and max_val == 0