Cheetah Software  1.0
plot_spline_1d Namespace Reference

Functions

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)
 

Variables

int PLOT_VERTICALLY = 0
 
int PLOT_HORIZONTALLY = 1
 
int num_figures = 5
 

Function Documentation

def plot_spline_1d.create_figures (   subfigure_width = 480,
  subfigure_height = 600,
  starting_figure_no = 1,
  starting_col_index = 0,
  starting_row_index = 0,
  plot_configuration = PLOT_HORIZONTALLY 
)

Definition at line 14 of file plot_spline_1d.py.

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
18 
19  file_path = os.getcwd() + "/../test_data/"
20 
21  ## read files
22  bspline = np.genfromtxt(file_path+'bspline_1d.txt', delimiter=None, dtype=(float))
23  bs_t = np.genfromtxt(file_path+'bs_time_1d.txt', delimiter='\n', dtype=(float))
24 
25  ## plot bspline
26  fig = plt.figure(figure_number)
27  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))
28  fig.canvas.set_window_title('bspline_pos_vel_acc')
29  for i in range(3):
30  ax1 = plt.subplot(3, 1, i+1)
31  plt.plot(bs_t, bspline[:,i], "b-")
32  plt.grid(True)
33  plt.xlabel('time (sec)')
34  ## increment figure number and index
35  figure_number += 1
36  if plot_configuration == PLOT_HORIZONTALLY:
37  col_index += 1
38  elif plot_configuration == PLOT_VERTICALLY:
39  row_index +=1
40 
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)

Variable Documentation

int plot_spline_1d.num_figures = 5

Definition at line 12 of file plot_spline_1d.py.

int plot_spline_1d.PLOT_HORIZONTALLY = 1

Definition at line 9 of file plot_spline_1d.py.

int plot_spline_1d.PLOT_VERTICALLY = 0

Definition at line 8 of file plot_spline_1d.py.