  import argparse
  import json
  import mpld3
  import sys
  from collections import defaultdict
  
  from tools.lib.logreader import logreader_from_route_or_segment
      
 
</s> remove import matplotlib.pyplot as plt
 </s> add  </s> remove   #mpld3.save_html(fig, 'test.html')
  mpld3.show()
 </s> add   plt.legend(handles=[mpatches.Patch(color=colors[i], label=SERVICES[i]) for i in range(len(SERVICES))])
  #mpld3.save_html(fig, 'latencylogger_plot.html')
  mpld3.show(fig) </s> remove         points["x"].append((event[1]-t0)/1e6)
        points["y"].append(frame_id+0.45)
        points["labels"].append(event[0])
    ax.broken_barh(service_bars, (frame_id, 0.9), facecolors=(["blue", 'green', 'red', 'yellow', 'purple']))

  scatter = ax.scatter(points['x'], points['y'], marker="d", edgecolor='black')
  tooltip = mpld3.plugins.PointLabelTooltip(scatter, labels=points["labels"])
  ax.legend()
 </s> add         points['x'].append((event[1]-t0)/1e6)
        points['y'].append(frame_id)
        points['labels'].append(event[0])
    ax.broken_barh(service_bars, (frame_id-0.45, 0.9), facecolors=(colors), alpha=0.5)

  scatter = ax.scatter(points['x'], points['y'], marker='d', edgecolor='black')
  tooltip = mpld3.plugins.PointLabelTooltip(scatter, labels=points['labels']) </s> remove DEMO_ROUTE = "9f583b1d93915c31|2022-04-01--17-51-29"
 </s> add DEMO_ROUTE = "9f583b1d93915c31|2022-04-06--11-34-03"
import matplotlib.patches as mpatches
import matplotlib.pyplot as plt
  import argparse
  import json
import matplotlib.patches as mpatches
import matplotlib.pyplot as plt
  import mpld3
  import sys
  from collections import defaultdict
  
  from tools.lib.logreader import logreader_from_route_or_segment
      
keep add keep keep keep keep keep keep
 latencylogger graph design (#24165)

* latencylogger graph design

* Update tools/latencylogger/latency_logger.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* quotes

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> 
tools/latencylogger/latency_logger.py