code: def coarsen_all_traces(level=2, exponential=False, axes="all", figure=None):
      
      if axes=="gca": axes=_pylab.gca()
      if axes=="all":
          if not figure: f = _pylab.gcf()
          axes = f.axes
  
      if not _fun.is_iterable(axes): axes = [axes]
  
      for a in axes:
          # get the lines from the plot
          lines = a.get_lines()
  
          # loop over the lines and trim the data
          for line in lines:
              if isinstance(line, _mpl.lines.Line2D):
                  coarsen_line(line, level, exponential, draw=False)
      _pylab.draw()
docs: This function does nearest-neighbor coarsening of the data. See 
      spinmob.fun.coarsen_data for more information.
      
      Parameters
      ----------
      level=2
          How strongly to coarsen.
      exponential=False
          If True, use the exponential method (great for log-x plots).
      axes="all"
          Which axes to coarsen.
      figure=None
          Which figure to use.