def image_data(Z, X=[<NUM_LIT:0>,<NUM_LIT:1.0>], Y=[<NUM_LIT:0>,<NUM_LIT:1.0>], aspect=<NUM_LIT:1.0>, zmin=None, zmax=None, clear=<NUM_LIT:1>, clabel='<STR_LIT:z>', autoformat=True, colormap="<STR_LIT>", shell_history=<NUM_LIT:0>, **kwargs):
global _colormap<EOL>if not '<STR_LIT>' in kwargs.keys(): kwargs['<STR_LIT>'] = '<STR_LIT>'<EOL>_pylab.ioff()<EOL>fig = _pylab.gcf()<EOL>if clear:<EOL><INDENT>fig.clear()<EOL>_pylab.axes()<EOL><DEDENT>X = _n.array(X)<EOL>Y = _n.array(Y)<EOL>Z = _n.array(Z)<EOL>x_width = abs(float(X[-<NUM_LIT:1>] - X[<NUM_LIT:0>])/(len(Z[<NUM_LIT:0>])-<NUM_LIT:1>))<EOL>y_width = abs(float(Y[-<NUM_LIT:1>] - Y[<NUM_LIT:0>])/(len(Z)-<NUM_LIT:1>))<EOL>Z = Z.transpose()<EOL>Z = Z[-<NUM_LIT:1>::-<NUM_LIT:1>]<EOL>xlabel='<STR_LIT>'<EOL>ylabel='<STR_LIT>'<EOL>title ='<STR_LIT>'<EOL>if '<STR_LIT>' in kwargs: xlabel = kwargs.pop('<STR_LIT>')<EOL>if '<STR_LIT>' in kwargs: ylabel = kwargs.pop('<STR_LIT>')<EOL>if '<STR_LIT:title>' in kwargs:  title  = kwargs.pop('<STR_LIT:title>')<EOL>_pylab.imshow(Z, extent=[X[<NUM_LIT:0>]-x_width/<NUM_LIT>, X[-<NUM_LIT:1>]+x_width/<NUM_LIT>,<EOL>Y[<NUM_LIT:0>]-y_width/<NUM_LIT>, Y[-<NUM_LIT:1>]+y_width/<NUM_LIT>], **kwargs)<EOL>cb = _pylab.colorbar()<EOL>_pt.image_set_clim(zmin,zmax)<EOL>_pt.image_set_aspect(aspect)<EOL>cb.set_label(clabel)<EOL>a = _pylab.gca()<EOL>a.set_xlabel(xlabel)<EOL>a.set_ylabel(ylabel)<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>a.set_title(title.strip())<EOL>if autoformat: _pt.image_format_figure(fig)<EOL>_pylab.ion()<EOL>_pylab.show()<EOL>_pylab.draw()<EOL>if colormap:<EOL><INDENT>if _colormap: _colormap.close()<EOL>_colormap = _pt.image_colormap(colormap, image=a.images[<NUM_LIT:0>])<EOL><DEDENT>
Generates an image plot.

Parameters
----------
Z   
    2-d array of z-values
X=[0,1.0], Y=[0,1.0]
    1-d array of x-values (only the first and last element are used)

See matplotlib's imshow() for additional optional arguments.