Cheetah Software  1.0
plot_curve 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
 

Function Documentation

def plot_curve.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 11 of file plot_curve.py.

11 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):
12  figure_number = starting_figure_no
13  col_index = starting_col_index
14  row_index = starting_row_index
15 
16  file_path = os.getcwd() + "/../test_data/"
17 
18  ## read files
19  curve_pos = np.genfromtxt(file_path+'curve_pos.txt', delimiter=None, dtype=(float))
20  bs_t = np.genfromtxt(file_path+'curve_time.txt', delimiter='\n', dtype=(float))
21 
22  ## plot curve_pos
23  fig = plt.figure(figure_number)
24  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))
25  fig.canvas.set_window_title('curve_pos_pos_vel_acc')
26  for i in range(1):
27  ax1 = plt.subplot(1, 1, i+1)
28  plt.plot(bs_t, curve_pos[:], "b-")
29  plt.grid(True)
30  plt.xlabel('time (sec)')
31  ## increment figure number and index
32  figure_number += 1
33  if plot_configuration == PLOT_HORIZONTALLY:
34  col_index += 1
35  elif plot_configuration == PLOT_VERTICALLY:
36  row_index +=1
37 
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)
Definition: plot_curve.py:11

Variable Documentation

int plot_curve.PLOT_HORIZONTALLY = 1

Definition at line 9 of file plot_curve.py.

int plot_curve.PLOT_VERTICALLY = 0

Definition at line 8 of file plot_curve.py.