parameters: (self, start_time=None, end_time=None,
                         settling_time=None, x_range=None, y_range=None,
                         plot_suffix=None)
docstring: Plot all position lists.
docstring_summary: Plot all position lists.
docstring_tokens: Plot all position lists .
function: def plot_positions(self, start_time=None, end_time=None,
                         settling_time=None, x_range=None, y_range=None,
                         plot_suffix=None):
          """Plot all position lists."""
          fig = pyplot.figure()
          fig.suptitle("Position")
          a_x = fig.add_subplot(111)
          for index, pos in enumerate(self.pos):
              # fig.suptitle(self.pose_topics[index])
              a_x.plot(pos.time, pos.x, 'b', label='x')
              a_x.plot(pos.time, pos.y, 'r', label='y')
              a_x.plot(pos.time, pos.z, 'g', label='z')
  
          if not y_range:
              y_max = max([max(pos.x), max(pos.y), max(pos.z)])
              y_min = min([min(pos.x), min(pos.y), min(pos.z)])
          else:
              y_max = y_range[1]
              y_min = y_range[0]
          y_center = (y_max + y_min)/2.0
  
          if start_time:
              a_x.axvline(x=start_time, color='c')
              pyplot.text(start_time, y_center, 'start evaluation', rotation=90,
                          color='c')
          if end_time:
              a_x.axvline(x=end_time, color='m')
              pyplot.text(end_time, y_max, 'end evaluation', rotation=90,
                          color='m')
          if settling_time:
              a_x.axvline(x=settling_time, color='k')
              pyplot.text(settling_time, y_max, 'settled, start RMS eval',
                          rotation=90, color='k')
  
          pyplot.xlabel('time [s]')
          pyplot.ylabel('position [m]')
          # Shrink current axis's height by 10% on the bottom
          box = a_x.get_position()
          a_x.set_position([box.x0, box.y0 + box.height * 0.2,
                           box.width, box.height * 0.8])
  
          # Put a legend below current axis
          a_x.legend(loc='upper center', bbox_to_anchor=(0.5, -0.15),
                     fancybox=True, shadow=True, ncol=5)
          pyplot.xlim(x_range)
          pyplot.ylim(y_range)
          pyplot.grid(b=True, which='both')
  
          if self.save_plots:
              file_name = self.prefix + '_pos' if self.prefix else 'pos'
              if plot_suffix:
                  file_name += '_' + str(plot_suffix)
              file_name += '.png'
              pyplot.savefig(file_name)
function_tokens: def plot_positions ( self , start_time = None , end_time = None , settling_time = None , x_range = None , y_range = None , plot_suffix = None ) : fig = pyplot . figure ( ) fig . suptitle ( "Position" ) a_x = fig . add_subplot ( 111 ) for index , pos in enumerate ( self . pos ) : # fig.suptitle(self.pose_topics[index]) a_x . plot ( pos . time , pos . x , 'b' , label = 'x' ) a_x . plot ( pos . time , pos . y , 'r' , label = 'y' ) a_x . plot ( pos . time , pos . z , 'g' , label = 'z' ) if not y_range : y_max = max ( [ max ( pos . x ) , max ( pos . y ) , max ( pos . z ) ] ) y_min = min ( [ min ( pos . x ) , min ( pos . y ) , min ( pos . z ) ] ) else : y_max = y_range [ 1 ] y_min = y_range [ 0 ] y_center = ( y_max + y_min ) / 2.0 if start_time : a_x . axvline ( x = start_time , color = 'c' ) pyplot . text ( start_time , y_center , 'start evaluation' , rotation = 90 , color = 'c' ) if end_time : a_x . axvline ( x = end_time , color = 'm' ) pyplot . text ( end_time , y_max , 'end evaluation' , rotation = 90 , color = 'm' ) if settling_time : a_x . axvline ( x = settling_time , color = 'k' ) pyplot . text ( settling_time , y_max , 'settled, start RMS eval' , rotation = 90 , color = 'k' ) pyplot . xlabel ( 'time [s]' ) pyplot . ylabel ( 'position [m]' ) # Shrink current axis's height by 10% on the bottom box = a_x . get_position ( ) a_x . set_position ( [ box . x0 , box . y0 + box . height * 0.2 , box . width , box . height * 0.8 ] ) # Put a legend below current axis a_x . legend ( loc = 'upper center' , bbox_to_anchor = ( 0.5 , - 0.15 ) , fancybox = True , shadow = True , ncol = 5 ) pyplot . xlim ( x_range ) pyplot . ylim ( y_range ) pyplot . grid ( b = True , which = 'both' ) if self . save_plots : file_name = self . prefix + '_pos' if self . prefix else 'pos' if plot_suffix : file_name += '_' + str ( plot_suffix ) file_name += '.png' pyplot . savefig ( file_name )