def manipulate_shown_data(f, input_axes="<STR_LIT>", output_axes=None, fxname=<NUM_LIT:1>, fyname=<NUM_LIT:1>, clear=<NUM_LIT:1>, pause=False, **kwargs):
<EOL>if input_axes == "<STR_LIT>": a1 = _pylab.gca()<EOL>else:                   a1 = input_axes<EOL>xmin, xmax = a1.get_xlim()<EOL>if fxname==<NUM_LIT:1>: fxname = f.__name__<EOL>if fyname==<NUM_LIT:1>: fyname = f.__name__<EOL>if output_axes == None:<EOL><INDENT>_pylab.figure(a1.figure.number+<NUM_LIT:1>)<EOL>a2 = _pylab.axes()<EOL><DEDENT>else:<EOL><INDENT>a2 = output_axes<EOL><DEDENT>if clear: a2.clear()<EOL>for line in a1.get_lines():<EOL><INDENT>if isinstance(line, _mpl.lines.Line2D):<EOL><INDENT>x, y = line.get_data()<EOL>x, y = _fun.trim_data(xmin, xmax, x, y)<EOL>new_x, new_y = f(x,y)<EOL>_s.plot.xy.data(new_x, new_y, clear=<NUM_LIT:0>, label=line.get_label().replace("<STR_LIT:_>", "<STR_LIT:->"), axes=a2, **kwargs)<EOL>if pause:<EOL><INDENT>_pylab.draw()<EOL>input("<STR_LIT>")<EOL><DEDENT><DEDENT><DEDENT>if fxname in [<NUM_LIT:0>,None]:  a2.set_xlabel(a1.get_xlabel())<EOL>else:                   a2.set_xlabel(fxname+"<STR_LIT:(>"+a1.get_xlabel()+"<STR_LIT:)>")<EOL>if fyname in [<NUM_LIT:0>,None]:  a2.set_ylabel(a1.get_ylabel())<EOL>else:                   a2.set_ylabel(fyname+"<STR_LIT:(>"+a1.get_ylabel()+"<STR_LIT:)>")<EOL>_pylab.draw()<EOL>
Loops over the visible data on the specified axes and modifies it based on
the function f(xdata, ydata), which must return new_xdata, new_ydata

input_axes  which axes to pull the data from
output_axes which axes to dump the manipulated data (None for new figure)

fxname      the name of the function on x
fyname      the name of the function on y
            1 means "use f.__name__"
            0 or None means no change.
            otherwise specify a string

**kwargs are sent to axes.plot