parameters: (self, z, axes, units)
docstring: Plots spacecraft trajectory.
  
          Args:
              - z (``tuple``, ``list``, ``numpy.ndarray``): Decision chromosome.
              - axes (``matplotlib.axes._subplots.Axes3DSubplot``): 3D axes to use for the plot
              - units (``float``, ``int``): Length unit by which to normalise data.
  
          Examples:
              >>> prob.extract(pykep.trajopt.indirect_or2or).plot_traj(pop.champion_x)
docstring_summary: Plots spacecraft trajectory.
docstring_tokens: Plots spacecraft trajectory .
function: def _plot_traj(self, z, axes, units):
          """Plots spacecraft trajectory.
  
          Args:
              - z (``tuple``, ``list``, ``numpy.ndarray``): Decision chromosome.
              - axes (``matplotlib.axes._subplots.Axes3DSubplot``): 3D axes to use for the plot
              - units (``float``, ``int``): Length unit by which to normalise data.
  
          Examples:
              >>> prob.extract(pykep.trajopt.indirect_or2or).plot_traj(pop.champion_x)
          """
  
          # times
          t0 = pk.epoch(0)
          tf = pk.epoch(z[0])
  
          # Mean Anomalies
          M0 = z[1] - self.elem0[1] * np.sin(z[1])
          Mf = z[2] - self.elemf[1] * np.sin(z[2])
  
          elem0 = np.hstack([self.elem0[:5], [M0]])
          elemf = np.hstack([self.elemf[:5], [Mf]])
  
          # Keplerian points
          kep0 = pk.planet.keplerian(t0, elem0)
          kepf = pk.planet.keplerian(tf, elemf)
  
          # planets
          pk.orbit_plots.plot_planet(
              kep0, t0=t0, units=units, axes=axes, color=(0.8, 0.8, 0.8))
          pk.orbit_plots.plot_planet(
              kepf, t0=tf, units=units, axes=axes, color=(0.8, 0.8, 0.8))
function_tokens: def _plot_traj ( self , z , axes , units ) : # times t0 = pk . epoch ( 0 ) tf = pk . epoch ( z [ 0 ] ) # Mean Anomalies M0 = z [ 1 ] - self . elem0 [ 1 ] * np . sin ( z [ 1 ] ) Mf = z [ 2 ] - self . elemf [ 1 ] * np . sin ( z [ 2 ] ) elem0 = np . hstack ( [ self . elem0 [ : 5 ] , [ M0 ] ] ) elemf = np . hstack ( [ self . elemf [ : 5 ] , [ Mf ] ] ) # Keplerian points kep0 = pk . planet . keplerian ( t0 , elem0 ) kepf = pk . planet . keplerian ( tf , elemf ) # planets pk . orbit_plots . plot_planet ( kep0 , t0 = t0 , units = units , axes = axes , color = ( 0.8 , 0.8 , 0.8 ) ) pk . orbit_plots . plot_planet ( kepf , t0 = tf , units = units , axes = axes , color = ( 0.8 , 0.8 , 0.8 ) )