code: def plot_world_with_matplotlib(
          world, marker_size=3, figsize=6, grid=True,
          wireframe=False, species_list=None, max_count=1000, angle=None,
          legend=True, noaxis=False, **kwargs):
      
      import matplotlib.pyplot as plt
  
      if species_list is None:
          species_list = [p.species().serial() for pid, p in world.list_particles()]
          species_list = sorted(
              set(species_list), key=species_list.index)  # XXX: pick unique ones
  
      fig, ax = __prepare_mplot3d_with_matplotlib(
          __get_range_of_world(world), figsize, grid, wireframe, angle, noaxis)
      scatters, plots = __scatter_world_with_matplotlib(
          world, ax, species_list, marker_size, max_count, **kwargs)
  
      # if legend:
      #     ax.legend(handles=plots, labels=species_list, 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(handles=plots, labels=species_list,  **legend_opts)
  
      plt.show()
docs: Generate a plot from received instance of World and show it on IPython notebook.
  
      Parameters
      ----------
      world : World or str
          World to render. A HDF5 filename is also acceptable.
      marker_size : float, default 3
          Marker size for all species. Size is passed to scatter function
          as argument, s=(2 ** marker_size).
      figsize : float, default 6
          Size of the plotting area. Given in inch.
      species_list : array of string, default None
          If set, plot_world will not search the list of species.
      max_count : Integer, default 1000
          The maximum number of particles to show for each species.
          None means no limitation.
      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