parameters: (visualizations_folder: Path, minimal_set_trajectories: dict)
docstring: Draw the visualizations for every trajectory and save it as an image.
  
      Args:
      ----
      visualizations_folder: Path
          The path to the folder for where to save the images
      minimal_set_trajectories: dict
          The minimal spanning set
docstring_summary: Draw the visualizations for every trajectory and save it as an image.
docstring_tokens: Draw the visualizations for every trajectory and save it as an image .
function: def save_visualizations(visualizations_folder: Path, minimal_set_trajectories: dict) -> None:
      """
      Draw the visualizations for every trajectory and save it as an image.
  
      Args:
      ----
      visualizations_folder: Path
          The path to the folder for where to save the images
      minimal_set_trajectories: dict
          The minimal spanning set
  
      """
      # Create the directory if it doesnt exist
      visualizations_folder.mkdir(exist_ok=True)
  
      for start_angle in minimal_set_trajectories.keys():
  
          for trajectory in minimal_set_trajectories[start_angle]:
              plt.plot(trajectory.path.xs, trajectory.path.ys, 'b')
  
      plt.grid(True)
      plt.axis('square')
      left_x, right_x = plt.xlim()
      left_y, right_y = plt.ylim()
  
      output_path = visualizations_folder / 'all_trajectories.png'
      plt.savefig(output_path)
      plt.clf()
  
      for start_angle in minimal_set_trajectories.keys():
  
          angle_in_deg = np.rad2deg(start_angle)
  
          if start_angle < 0 or start_angle > np.pi / 2:
              continue
  
          for trajectory in minimal_set_trajectories[start_angle]:
              plt.plot(trajectory.path.xs, trajectory.path.ys, 'b')
              plt.xlim(left_x, right_x)
              plt.ylim(left_y, right_y)
  
          plt.grid(True)
  
          output_path = visualizations_folder / f'{angle_in_deg}.png'
          plt.savefig(output_path)
          plt.clf()
function_tokens: def save_visualizations ( visualizations_folder : Path , minimal_set_trajectories : dict ) -> None : # Create the directory if it doesnt exist visualizations_folder . mkdir ( exist_ok = True ) for start_angle in minimal_set_trajectories . keys ( ) : for trajectory in minimal_set_trajectories [ start_angle ] : plt . plot ( trajectory . path . xs , trajectory . path . ys , 'b' ) plt . grid ( True ) plt . axis ( 'square' ) left_x , right_x = plt . xlim ( ) left_y , right_y = plt . ylim ( ) output_path = visualizations_folder / 'all_trajectories.png' plt . savefig ( output_path ) plt . clf ( ) for start_angle in minimal_set_trajectories . keys ( ) : angle_in_deg = np . rad2deg ( start_angle ) if start_angle < 0 or start_angle > np . pi / 2 : continue for trajectory in minimal_set_trajectories [ start_angle ] : plt . plot ( trajectory . path . xs , trajectory . path . ys , 'b' ) plt . xlim ( left_x , right_x ) plt . ylim ( left_y , right_y ) plt . grid ( True ) output_path = visualizations_folder / f'{angle_in_deg}.png' plt . savefig ( output_path ) plt . clf ( )