change in dpi changes the figure size

Hello, As mentioned in the

    > site(http://matplotlib.sourceforge.net/matplotlib.pylab.html#-savefig)
    > dpi is the resolution in dots per inch. When we
    > change dpi the size of the figure gets changed. But we
    > want the resolution to be changed and not the figure
    > size.

    > Can anyone give more information on 'dpi' parameter.

The figure size in pixels is width*dpi by height*dpi. png is a raster
format which means it stores the information in a pixel buffer. You
cannot get higher resolution without changing the figure size in
pixels. If you want a higher resolution picture, set the dpi to a
higher number.

Alternatively, as others have suggested, use a vector output like PS
or SVG.

JPEG will not give you a better picture quality -- usually it will be
worse for lines and such.

JDH