File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 11from datetime import datetime , timedelta , timezone
22
3+ import matplotlib .dates as mdates
34import matplotlib .pyplot as plt
45from yamcs .client import YamcsClient
56
1314 samples = archive .downsample_mean ("/YSS/SIMULATOR/Altitude" , start = start , stop = stop )
1415 x = [s .time for s in samples ]
1516 y = [s .avg for s in samples ]
17+
18+ mx = [mdates .date2num (t ) for t in x ]
19+ my = [val if val is not None else float ("nan" ) for val in y ]
20+
1621 plt .subplot (2 , 1 , 1 )
1722 plt .title ("Sampled at " + str (stop ))
18- plt .plot (x , y )
23+ plt .plot (mx , my )
1924 plt .xlim (start , stop )
2025 plt .ylabel ("Altitude" )
2126 plt .grid ()
2429 samples = archive .downsample_mean ("/YSS/SIMULATOR/SinkRate" , start = start , stop = stop )
2530 x = [s .time for s in samples ]
2631 y = [s .avg for s in samples ]
32+
33+ mx = [mdates .date2num (t ) for t in x ]
34+ my = [val if val is not None else float ("nan" ) for val in y ]
35+
2736 plt .subplot (2 , 1 , 2 )
28- plt .plot (x , y )
37+ plt .plot (mx , my )
2938 plt .xlim (start , stop )
3039 plt .xlabel ("UTC" )
3140 plt .ylabel ("Sink Rate" )
You can’t perform that action at this time.
0 commit comments