@@ -56,7 +56,7 @@ def plot_success_timeline(
5656 """
5757 # Plot a timeline of the TX and RX successes.
5858 plt .style .use (["science" , "grid" ])
59- fig , ax = plt .subplots (figsize = (12 , 4 ))
59+ fig , ax = plt .subplots (figsize = (20 , 4 ))
6060 for index , (successes , label ) in enumerate ([
6161 (rx_successes , "RX" ),
6262 (tx_successes , "TX" ),
@@ -70,7 +70,18 @@ def plot_success_timeline(
7070 alpha = 0.25 ,
7171 label = label ,
7272 )
73- ax .set_title ("Channel calibration timeline" )
73+ first_x , first_y = [], []
74+ for channel in set (y ):
75+ first_index = y .index (channel )
76+ first_x .append (x [first_index ])
77+ first_y .append (y [first_index ])
78+ ax .scatter (
79+ first_x ,
80+ first_y ,
81+ c = ["blue" , "red" ][index ],
82+ label = f"Channel { label } done" ,
83+ marker = "*" ,
84+ )
7485 ax .set_xlabel ("Elapsed time [s]" )
7586 ax .set_ylabel ("IEEE 802.15.4 channel" )
7687 ax .legend ()
@@ -82,7 +93,7 @@ def main(argv):
8293
8394 log_processor = ChannelCalibrationLogProcessor (FLAGS .log )
8495 plt .style .use (["science" , "grid" ])
85- fig , (ax1 , ax2 ) = plt .subplots (1 , 2 , figsize = (12 , 4 ))
96+ fig , (ax1 , ax2 ) = plt .subplots (1 , 2 , figsize = (16 , 4 ))
8697 plot_channel_histogram (log_processor .tx_successes , "TX" , ax1 )
8798 plot_channel_histogram (log_processor .rx_successes , "RX" , ax2 )
8899 plt .show ()
0 commit comments