code: def plot_trajectory_with_matplotlib(
          obs, max_count=10, figsize=6, legend=True, angle=None,
          wireframe=False, grid=True, noaxis=False, plot_range=None, **kwargs):
      
      import matplotlib.pyplot as plt
  
      data = obs.data()
      if max_count is not None and len(data) > max_count:
          data = random.sample(data, max_count)
  
      fig, ax = __prepare_mplot3d_with_matplotlib(
          __get_range_of_trajectories(data, plot_range),
          figsize, grid, wireframe, angle, noaxis)
  
      lines = []
      for i, y in enumerate(data):
          xarr, yarr, zarr = [], [], []
          for pos in y:
              xarr.append(pos[0])
              yarr.append(pos[1])
              zarr.append(pos[2])
  
          lines.append((xarr, yarr, zarr))
  
      __plot_trajectory_with_matplotlib(lines, ax, **kwargs)
  
      # if legend:
      #     ax.legend(loc='best', shadow=True)
      if legend is not None and legend is not False:
          legend_opts = {"loc": "best", "shadow": True}
          if isinstance(legend, dict):
              legend_opts.update(legend)
          ax.legend(**legend_opts)
      plt.show()
docs: Generate a plot from received instance of TrajectoryObserver and show it
      on IPython notebook.
  
      Parameters
      ----------
      obs : TrajectoryObserver
          TrajectoryObserver to render.
      max_count : Integer, default 10
          The maximum number of particles to show. If None, show all.
      figsize : float, default 6
          Size of the plotting area. Given in inch.
      angle : tuple, default None
          A tuple of view angle which is given as (azim, elev, dist).
          If None, use default assumed to be (-60, 30, 10).
      legend : bool, default True
      plot_range : tuple, default None
          Range for plotting. A triplet of pairs suggesting (rangex, rangey, rangez).
          If None, the minimum volume containing all the trajectories is used.