code: def plot_world2d_with_matplotlib(
          world, plane='xy', marker_size=3, figsize=6, grid=True,
          wireframe=False, species_list=None, max_count=1000, angle=None,
          legend=True, noaxis=False, scale=1.0, **kwargs):
      import matplotlib.pyplot as plt
      plane = plane.lower()
      if len(plane) != 2 or plane[0] not in ('x', 'y', 'z') or plane[1] not in ('x', 'y', 'z'):
          raise ValueError("invalid 'plane' argument [{}] was given.".format(repr(plane)))
      xidx = 0 if plane[0] == 'x' else (1 if plane[0] == 'y' else 2)
      yidx = 0 if plane[1] == 'x' else (1 if plane[1] == 'y' else 2)
      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)
      wrange = __get_range_of_world(world, scale)
      wrange = (wrange['x'], wrange['y'], wrange['z'])
      wrange = {'x': wrange[xidx], 'y': wrange[yidx]}
      fig, ax = __prepare_plot_with_matplotlib(
          wrange, figsize, grid, wireframe, noaxis)
      scatters, plots = __scatter_world2d_with_matplotlib(
          world, (xidx, yidx), ax, species_list, marker_size, max_count, scale, **kwargs)
      ax.set_xlabel(plane[0].upper())
      ax.set_ylabel(plane[1].upper())
      if legend is not None and legend is not False:
          legend_opts = {'loc': 'center left', 'bbox_to_anchor': (1.0, 0.5),
                         'shadow': False, 'frameon': False, 'fontsize': 'x-large',
                         'scatterpoints': 1}
          if isinstance(legend, dict):
              legend_opts.update(legend)
          ax.legend(**legend_opts)
      plt.show()