code: def line_math(fx=None, fy=None, axes='gca'):
      
  
      if axes=='gca': axes = _pylab.gca()
  
      lines = axes.get_lines()
  
      for line in lines:
          if isinstance(line, _mpl.lines.Line2D):
              xdata, ydata = line.get_data()
              if not fx==None: xdata = fx(xdata)
              if not fy==None: ydata = fy(ydata)
              line.set_data(xdata,ydata)
  
      _pylab.draw()
docs: applies function fx to all xdata and fy to all ydata.