From efdd5e0c4440769dbc239ec99ac4160031b16bed Mon Sep 17 00:00:00 2001
From: David Wehr <dawehr@iastate.edu>
Date: Tue, 25 Apr 2017 20:47:21 -0500
Subject: [PATCH] Merged simplePlots

---
 controls/DataAnalysisTool/Tool/simplePlots.m | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/controls/DataAnalysisTool/Tool/simplePlots.m b/controls/DataAnalysisTool/Tool/simplePlots.m
index 330ba82b4..c969045e1 100644
--- a/controls/DataAnalysisTool/Tool/simplePlots.m
+++ b/controls/DataAnalysisTool/Tool/simplePlots.m
@@ -40,22 +40,30 @@ linkaxes([ax1, ax2], 'x');
 ax2 = subplot(2,2,1);
 plot(expData.Time.data, expData.X_Setpoint_Constant.data - expData.VRPN_X_Constant.data);
 title('X error');
+ylabel('meters');
+xlabel('time (s)');
 
 ax1 = subplot(2,2,2);
 plot(expData.Time.data, expData.X_pos_PID_Correction.data);
-title('x output');
+title('x controller output');
+ylabel('rad');
+xlabel('time (s)');
 
 ax3 = subplot(2,2,3);
 plot(expData.Time.data, expData.Pitch_PID_Correction.data); hold on;
-plot(expData.Time.data, expData.VRPN_Pitch_Constant.data .* 10);
+%plot(expData.Time.data, expData.VRPN_Pitch_Constant.data .* 10);
 title('pitch output');
-legend('output', 'Pitch x10');
+ylabel('rad/s');
+%legend('output', 'Pitch x10');
+xlabel('time (s)');
 
 ax4 = subplot(2,2,4);
 plot(expData.Time.data, expData.Pitch_Rate_PID_Correction.data); hold on;
-plot(expData.Time.data, expData.gyro_y.data .* 100000);
-legend('output', 'Pitch rate x100000');
+%plot(expData.Time.data, expData.gyro_y.data * 0.1);
+%legend('output', 'Pitch rate x100000');
+ylabel('Normalized PWM');
 title('pitch rate output');
+xlabel('time (s)');
 
 linkaxes([ax1, ax2, ax3, ax4], 'x');
 %% X pos controller flow
@@ -282,6 +290,7 @@ xlabel('Time (s)');
 ylabel('Displacement (m)');
 hold off;
 
+linkaxes([ax1, ax2, ax3], 'x');
 
 
 linkaxes([ax1, ax2, ax3], 'x');
-- 
GitLab