parameters: (self, z, axes, units=pk.AU)
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_pt2or).plot_traj(pop.champion_x)
docstring_summary: Plots spacecraft trajectory.
docstring_tokens: Plots spacecraft trajectory .
function: def _plot_traj(self, z, axes, units=pk.AU):
          """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_pt2or).plot_traj(pop.champion_x)
          """
  
          # states
          x0 = self.x0
  
          # times
          t0 = self.t0
          tf = pk.epoch(t0.mjd2000 + z[0])
  
          # Computes the osculating Keplerian elements at start
          elem0 = list(pk.ic2par(x0[0:3], x0[3:6], self.leg.mu))
  
          # Converts the eccentric anomaly into eccentric anomaly
          elem0[5] = elem0[5] - elem0[1] * np.sin(elem0[5])
  
          # Creates a virtual keplerian planet with the said elements
          kep0 = pk.planet.keplerian(t0, elem0)
  
          # Plots the departure and arrival osculating orbits
          pk.orbit_plots.plot_planet(
              kep0, t0, units=units, color=(0.8, 0.8, 0.8), axes=axes)
          pk.orbit_plots.plot_planet(
              self.pf, tf, units=units, color=(0.8, 0.8, 0.8), axes=axes)
function_tokens: def _plot_traj ( self , z , axes , units = pk . AU ) : # states x0 = self . x0 # times t0 = self . t0 tf = pk . epoch ( t0 . mjd2000 + z [ 0 ] ) # Computes the osculating Keplerian elements at start elem0 = list ( pk . ic2par ( x0 [ 0 : 3 ] , x0 [ 3 : 6 ] , self . leg . mu ) ) # Converts the eccentric anomaly into eccentric anomaly elem0 [ 5 ] = elem0 [ 5 ] - elem0 [ 1 ] * np . sin ( elem0 [ 5 ] ) # Creates a virtual keplerian planet with the said elements kep0 = pk . planet . keplerian ( t0 , elem0 ) # Plots the departure and arrival osculating orbits pk . orbit_plots . plot_planet ( kep0 , t0 , units = units , color = ( 0.8 , 0.8 , 0.8 ) , axes = axes ) pk . orbit_plots . plot_planet ( self . pf , tf , units = units , color = ( 0.8 , 0.8 , 0.8 ) , axes = axes )