11import matplotlib .pyplot as plt
22import numpy as np
3+ import logging
34
45from fcutils .plotting .utils import clean_axes , save_figure
56from fcutils .plotting .colors import desaturate_color
@@ -102,9 +103,8 @@ def _plot_v(history, trajectory, plot_every, ax=None):
102103 )
103104
104105 # plot history speed
105- x = np .linspace (0 , len (trajectory ), len (v ))
106106 ax .plot (
107- x , v , color = colors ["v" ], lw = 2 , zorder = 100 ,
107+ history [ "trajectory_idx" ] , v , color = colors ["v" ], lw = 2 , zorder = 100 ,
108108 )
109109
110110
@@ -113,9 +113,9 @@ def _plot_accel(history, ax=None):
113113 vdot = derivative (v )
114114 omegadot = derivative (omega )
115115
116- plot_line_outlined (ax , vdot , lw = 2 , color = colors ["v" ], label = "$v $" )
116+ plot_line_outlined (ax , vdot , lw = 2 , color = colors ["v" ], label = "$\dot{v} $" )
117117 plot_line_outlined (
118- ax , omegadot , lw = 2 , color = colors ["omega" ], label = "$\omega$"
118+ ax , omegadot , lw = 2 , color = colors ["omega" ], label = "$\dot{\ omega} $"
119119 )
120120 ax .legend ()
121121
@@ -150,3 +150,4 @@ def plot_results(results_folder, plot_every=20, save_path=None):
150150
151151 if save_path is not None :
152152 save_figure (f , str (save_path ))
153+ logging .info (f"Saved summary figure at: { save_path } " )
0 commit comments