14 def create_figures(subfigure_width=480, subfigure_height=600, starting_figure_no=1, starting_col_index = 0, starting_row_index=0, plot_configuration=PLOT_HORIZONTALLY):
15 figure_number = starting_figure_no
16 col_index = starting_col_index
17 row_index = starting_row_index
19 file_path = os.getcwd() +
"/../test_data/" 23 pos = np.genfromtxt(file_path+
'opt_spline_pos.txt', delimiter=
None, dtype=(float))
24 vel = np.genfromtxt(file_path+
'opt_spline_vel.txt', delimiter=
None, dtype=(float))
25 acc = np.genfromtxt(file_path+
'opt_spline_acc.txt', delimiter=
None, dtype=(float))
26 t = np.genfromtxt(file_path+
'opt_spline_time.txt', delimiter=
'\n', dtype=(float))
29 fig = plt.figure(figure_number)
30 plt.get_current_fig_manager().window.wm_geometry(str(subfigure_width) +
"x" + str(subfigure_height) +
"+" + str(subfigure_width*col_index) +
"+" + str(subfigure_height*row_index))
31 fig.canvas.set_window_title(
'pos')
33 ax1 = plt.subplot(dim, 1, i+1)
34 plt.plot(t, pos[:,i],
"b-")
36 plt.xlabel(
'time (sec)')
39 if plot_configuration == PLOT_HORIZONTALLY:
41 elif plot_configuration == PLOT_VERTICALLY:
45 fig = plt.figure(figure_number)
46 plt.get_current_fig_manager().window.wm_geometry(str(subfigure_width) +
"x" + str(subfigure_height) +
"+" + str(subfigure_width*col_index) +
"+" + str(subfigure_height*row_index))
47 fig.canvas.set_window_title(
'vel')
49 ax1 = plt.subplot(dim, 1, i+1)
50 plt.plot(t, vel[:,i],
"b-")
52 plt.xlabel(
'time (sec)')
55 if plot_configuration == PLOT_HORIZONTALLY:
57 elif plot_configuration == PLOT_VERTICALLY:
61 fig = plt.figure(figure_number)
62 plt.get_current_fig_manager().window.wm_geometry(str(subfigure_width) +
"x" + str(subfigure_height) +
"+" + str(subfigure_width*col_index) +
"+" + str(subfigure_height*row_index))
63 fig.canvas.set_window_title(
'acc')
65 ax1 = plt.subplot(dim, 1, i+1)
66 plt.plot(t, acc[:,i],
"b-")
68 plt.xlabel(
'time (sec)')
71 if plot_configuration == PLOT_HORIZONTALLY:
73 elif plot_configuration == PLOT_VERTICALLY:
def create_figures(subfigure_width=480, subfigure_height=600, starting_figure_no=1, starting_col_index=0, starting_row_index=0, plot_configuration=PLOT_HORIZONTALLY)