def xy_data(xdata, ydata, eydata=None, exdata=None, label=None, xlabel='<STR_LIT>', ylabel='<STR_LIT>',title='<STR_LIT>', shell_history=<NUM_LIT:0>, xshift=<NUM_LIT:0>, yshift=<NUM_LIT:0>, xshift_every=<NUM_LIT:1>, yshift_every=<NUM_LIT:1>,coarsen=<NUM_LIT:0>, style=None,  clear=True, axes=None, xscale='<STR_LIT>', yscale='<STR_LIT>', grid=False,legend='<STR_LIT>', legend_max=<NUM_LIT:20>, autoformat=True, autoformat_window=True, tall=False, draw=True, **kwargs):
_pylab.ioff()<EOL>xdata, ydata = _match_data_sets(xdata, ydata)<EOL>exdata = _match_error_to_data_set(xdata, exdata)<EOL>eydata = _match_error_to_data_set(ydata, eydata)<EOL>if not _fun.is_iterable(label): label = [label]*len(xdata)<EOL>while len(label) < len(ydata):  label.append(label[<NUM_LIT:0>])<EOL>if len(label) > legend_max:<EOL><INDENT>label[legend_max-<NUM_LIT:2>] = '<STR_LIT>'<EOL>for n in range(legend_max-<NUM_LIT:1>,len(label)-<NUM_LIT:1>): label[n] = "<STR_LIT>"<EOL><DEDENT>if clear and not axes: _pylab.gcf().clear() <EOL>if axes=="<STR_LIT>" or axes is None: axes = _pylab.gca()<EOL>if clear: axes.clear()<EOL>_pylab.axes(axes)<EOL>for n in range(<NUM_LIT:0>,len(xdata)):<EOL><INDENT>if label[n]=='<STR_LIT>':<EOL><INDENT>l = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>l = str(n)+"<STR_LIT>"+str(label[n])<EOL><DEDENT>dx = xshift*(n/xshift_every)<EOL>dy = yshift*(n/yshift_every)<EOL>x  = _fun.coarsen_array(xdata[n],  coarsen)<EOL>y  = _fun.coarsen_array(ydata[n],  coarsen)<EOL>ey = _fun.coarsen_array(eydata[n], coarsen, '<STR_LIT>')<EOL>ex = _fun.coarsen_array(exdata[n], coarsen, '<STR_LIT>')<EOL>if not style is None: kwargs.update(next(style))<EOL>axes.errorbar(x+dx, y+dy, label=l, yerr=ey, xerr=ex, **kwargs)<EOL><DEDENT>_pylab.xscale(xscale)<EOL>_pylab.yscale(yscale)<EOL>if legend: axes.legend(loc=legend)<EOL>axes.set_xlabel(xlabel)<EOL>axes.set_ylabel(ylabel)<EOL>if title in [None, False, <NUM_LIT:0>]:<EOL><INDENT>axes.set_title('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>title = str(title)<EOL>history = _fun.get_shell_history()<EOL>for n in range(<NUM_LIT:0>, min(shell_history, len(history))):<EOL><INDENT>title = title + "<STR_LIT:\n>" + history[n].split('<STR_LIT:\n>')[<NUM_LIT:0>].strip()<EOL><DEDENT>title = title + '<STR_LIT>' + _time.asctime()<EOL>axes.set_title(title)<EOL><DEDENT>if grid: _pylab.grid(True)<EOL>if autoformat:<EOL><INDENT>_pt.format_figure(draw=False, modify_geometry=autoformat_window)<EOL>_pt.auto_zoom(axes=axes, draw=False)<EOL><DEDENT>if draw:<EOL><INDENT>_pylab.ion()<EOL>_pylab.draw()<EOL>_pylab.show()<EOL><DEDENT>return axes<EOL>
Plots specified data.

Parameters
----------
xdata, ydata        
    Arrays (or arrays of arrays) of data to plot
eydata=None, exdata=None     
    Arrays of x and y errorbar values
label=None         
    String or array of strings for the line labels
xlabel=''           
    Label for the x-axis
ylabel=''           
    Label for the y-axis
title=''            
    Title for the axes; set to None to have nothing.
shell_history=0     
    How many commands from the pyshell history to include with the title
xshift=0, yshift=0  
    Progressive shifts on the data, to make waterfall plots
xshift_every=1      
    Perform the progressive shift every 1 or n'th line.
yshift_every=1      
    perform the progressive shift every 1 or n'th line.
style=None            
    style cycle object.
clear=True          
    If no axes are specified (see below), clear the figure, otherwise clear just the axes.
axes=None           
    Which matplotlib axes to use, or "gca" for the current axes
xscale='linear', yscale='linear'      
    'linear' or 'log' x and y axis scales.
grid=False          
    Should we draw a grid on the axes?
legend='best'       
    Where to place the legend (see pylab.legend() for options)
    Set this to None to ignore the legend.
legend_max=20
    Number of legend entries before it's truncated with '...'
autoformat=True     
    Should we format the figure for printing?
autoformat_window=True
    Should we resize and reposition the window when autoformatting?
tall=False               
    Should the format be tall?
draw=True           
    Whether or not to draw the plot after plotting.

See matplotlib's errorbar() function for additional optional keyword arguments.