parameters: (ax,stamps,traj,style,color,label)
docstring: Plot a trajectory using matplotlib. 
      3D图
      Input:
      ax -- the plot
      stamps -- time stamps (1xn)
      traj -- trajectory (3xn)
      style -- line style
      color -- line color
      label -- plot legend
docstring_summary: Plot a trajectory using matplotlib. 
      3D图
      Input:
      ax -- the plot
      stamps -- time stamps (1xn)
      traj -- trajectory (3xn)
      style -- line style
      color -- line color
      label -- plot legend
docstring_tokens: Plot a trajectory using matplotlib . 3D图 Input : ax -- the plot stamps -- time stamps ( 1xn ) traj -- trajectory ( 3xn ) style -- line style color -- line color label -- plot legend
function: def plot_traj3D(ax,stamps,traj,style,color,label):
      """
      Plot a trajectory using matplotlib. 
      3D图
      Input:
      ax -- the plot
      stamps -- time stamps (1xn)
      traj -- trajectory (3xn)
      style -- line style
      color -- line color
      label -- plot legend
      
      """
      stamps.sort()
      interval = numpy.median([s-t for s,t in zip(stamps[1:],stamps[:-1])])
      x = []
      y = []
      z = []
      last = stamps[0]
      for i in range(len(stamps)):
          if stamps[i]-last < 2*interval:
              x.append(traj[i][0])
              y.append(traj[i][1])
              z.append(traj[i][2])
          elif len(x)>0:
              ax.plot(x,y,z,style,color=color,label=label)
              
              label=""
              x=[]
              y=[]
              z=[]
          last= stamps[i]
      if len(x)>0:
          ax.plot(x,y,z,style,color=color,label=label)
function_tokens: def plot_traj3D ( ax , stamps , traj , style , color , label ) : stamps . sort ( ) interval = numpy . median ( [ s - t for s , t in zip ( stamps [ 1 : ] , stamps [ : - 1 ] ) ] ) x = [ ] y = [ ] z = [ ] last = stamps [ 0 ] for i in range ( len ( stamps ) ) : if stamps [ i ] - last < 2 * interval : x . append ( traj [ i ] [ 0 ] ) y . append ( traj [ i ] [ 1 ] ) z . append ( traj [ i ] [ 2 ] ) elif len ( x ) > 0 : ax . plot ( x , y , z , style , color = color , label = label ) label = "" x = [ ] y = [ ] z = [ ] last = stamps [ i ] if len ( x ) > 0 : ax . plot ( x , y , z , style , color = color , label = label )