diff --git a/scripts/plot_data.py b/scripts/plot_data.py index e2c4187..33be175 100644 --- a/scripts/plot_data.py +++ b/scripts/plot_data.py @@ -34,19 +34,19 @@ def plot(csvfile): """ - df = pd.read_csv(csvfile, index_col='time') + df = pd.read_csv(csvfile, index_col='time', sep=";") fig, axes = plt.subplots(5, 1, sharex=True) df[['ay', 'az']].plot(ax=axes[0]) - df['wz'].pot(ax=axes[1]) + df['wx'].plot(ax=axes[1]) - df[['theta_a', 'theta_af']].apply(np.rad2deg).plot(axes[2]) + df[['theta_a', 'theta_af']].apply(np.rad2deg).plot(ax=axes[2]) - df[['theta_g', 'theta_gf']].apply(np.rad2deg).plot(axes[3]) + df[['theta_g', 'theta_gf']].apply(np.rad2deg).plot(ax=axes[3]) - df['theta'].apply(np.rad2deg).plot(axes[4]) + df['theta'].apply(np.rad2deg).plot(ax=axes[4]) return axes @@ -57,5 +57,6 @@ def plot(csvfile): parser.add_argument('csvfile') args = parser.parse_args() - plot(args.csvfile) + axis = plot(args.csvfile) +# axis[0]. plt.show()