plot_utils: Create a plot_controller() function to plot the controller of multiple runs
diff --git a/cr2/plot_utils.py b/cr2/plot_utils.py
index 933e99f..fc59d62 100644
--- a/cr2/plot_utils.py
+++ b/cr2/plot_utils.py
@@ -156,3 +156,14 @@
for ax, run in zip(axis, runs):
run.plot_allfreqs(map_label, ax=ax)
+
+def plot_controller(runs, width=None, height=None):
+ """Make a multicolumn plot of the pid controller of each run"""
+ num_runs = len(runs)
+ axis = pre_plot_setup(width=width, height=height, ncols=num_runs)
+
+ if num_runs == 1:
+ axis = [axis]
+
+ for ax, run in zip(axis, runs):
+ run.pid_controller.plot_controller(title=run.name, ax=ax)