def METHOD_NAME(num, line1, line2):
    global xs, ys, max_y
    time_text.set_text(time_template % (num*dt) )
    receive_data = str(ser.readline())      #string
    g, v = parse_line(receive_data)
    if (g in range(1,5)):
      # print(v,g)
      if v>max_y:
        max_y = v
        print(max_y)
        ax.set_ylim([0, max_y * 1.2])
      idx = 0
      for y in ys:
        y.append(y[-1])
        if idx == g-1:
          y[-1] = v
        idx = idx +1
      xs.append(xs[-1]+1)
    if len(ys[0])>200:
        xs.pop()
        for y in ys:
          y.pop(0)
    line1.set_data(xs, ys[0])
    line2.set_data(xs, ys[1])
    line3.set_data(xs, ys[2])
    line4.set_data(xs, ys[3])
    return [line1,line2,line3,line4, time_text]