@@ -381,10 +381,10 @@ def draw_profile(graph, profile):
381
381
# draw labels
382
382
x = profile ["time_range" ][0 ]
383
383
y = profile ["stages" ]["reflow" ][1 ]
384
- xp = (GXSTART + graph .width * (x - graph .xmin )
385
- // (graph .xmax - graph .xmin ))
384
+ xp = int (GXSTART + graph .width * (x - graph .xmin )
385
+ // (graph .xmax - graph .xmin ))
386
386
yp = int (GHEIGHT * (y - graph .ymin )
387
- / (graph .ymax - graph .ymin ))
387
+ / / (graph .ymax - graph .ymin ))
388
388
389
389
label_reflow .x = xp + 10
390
390
label_reflow .y = HEIGHT - yp
@@ -396,25 +396,32 @@ def draw_profile(graph, profile):
396
396
y = profile ["stages" ]["reflow" ][1 ]
397
397
398
398
# draw time line (horizontal)
399
- graph .draw_line (graph .xmin , graph .ymin + 1 , graph .xmax , graph .ymin + 1 , AXIS_SIZE , AXIS_COLOR , 1 )
399
+ graph .draw_line (graph .xmin , graph .ymin + 1 , graph .xmax ,
400
+ graph .ymin + 1 , AXIS_SIZE , AXIS_COLOR , 1 )
400
401
graph .draw_line (graph .xmin , graph .ymax , graph .xmax , graph .ymax ,
401
402
AXIS_SIZE , AXIS_COLOR , 1 )
402
403
# draw time ticks
403
404
tick = graph .xmin
404
405
while tick < (graph .xmax - graph .xmin ):
405
- graph .draw_line (tick , graph .ymin , tick , graph .ymin + 10 , AXIS_SIZE , AXIS_COLOR , 1 )
406
- graph .draw_line (tick , graph .ymax , tick , graph .ymax - 10 - AXIS_SIZE , AXIS_SIZE , AXIS_COLOR , 1 )
406
+ graph .draw_line (tick , graph .ymin , tick , graph .ymin + 10 ,
407
+ AXIS_SIZE , AXIS_COLOR , 1 )
408
+ graph .draw_line (tick , graph .ymax , tick , graph .ymax - 10 - AXIS_SIZE ,
409
+ AXIS_SIZE , AXIS_COLOR , 1 )
407
410
tick += 60
408
411
409
412
# draw temperature line (vertical)
410
- graph .draw_line (graph .xmin , graph .ymin , graph .xmin , graph .ymax , AXIS_SIZE , AXIS_COLOR , 1 )
411
- graph .draw_line (graph .xmax - AXIS_SIZE + 1 , graph .ymin , graph .xmax - AXIS_SIZE + 1 ,
413
+ graph .draw_line (graph .xmin , graph .ymin , graph .xmin ,
414
+ graph .ymax , AXIS_SIZE , AXIS_COLOR , 1 )
415
+ graph .draw_line (graph .xmax - AXIS_SIZE + 1 , graph .ymin ,
416
+ graph .xmax - AXIS_SIZE + 1 ,
412
417
graph .ymax , AXIS_SIZE , AXIS_COLOR , 1 )
413
418
# draw temperature ticks
414
419
tick = graph .ymin
415
420
while tick < (graph .ymax - graph .ymin )* 1.1 :
416
- graph .draw_line (graph .xmin , tick , graph .xmin + 10 , tick , AXIS_SIZE , AXIS_COLOR , 1 )
417
- graph .draw_line (graph .xmax , tick , graph .xmax - 10 - AXIS_SIZE , tick , AXIS_SIZE , AXIS_COLOR , 1 )
421
+ graph .draw_line (graph .xmin , tick , graph .xmin + 10 , tick ,
422
+ AXIS_SIZE , AXIS_COLOR , 1 )
423
+ graph .draw_line (graph .xmax , tick , graph .xmax - 10 - AXIS_SIZE ,
424
+ tick , AXIS_SIZE , AXIS_COLOR , 1 )
418
425
tick += 50
419
426
420
427
# draw profile
0 commit comments