@@ -381,10 +381,10 @@ def draw_profile(graph, profile):
381381 # draw labels
382382 x = profile ["time_range" ][0 ]
383383 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 ))
386386 yp = int (GHEIGHT * (y - graph .ymin )
387- / (graph .ymax - graph .ymin ))
387+ / / (graph .ymax - graph .ymin ))
388388
389389 label_reflow .x = xp + 10
390390 label_reflow .y = HEIGHT - yp
@@ -396,25 +396,32 @@ def draw_profile(graph, profile):
396396 y = profile ["stages" ]["reflow" ][1 ]
397397
398398 # 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 )
400401 graph .draw_line (graph .xmin , graph .ymax , graph .xmax , graph .ymax ,
401402 AXIS_SIZE , AXIS_COLOR , 1 )
402403 # draw time ticks
403404 tick = graph .xmin
404405 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 )
407410 tick += 60
408411
409412 # 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 ,
412417 graph .ymax , AXIS_SIZE , AXIS_COLOR , 1 )
413418 # draw temperature ticks
414419 tick = graph .ymin
415420 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 )
418425 tick += 50
419426
420427 # draw profile
0 commit comments