Eric, list -

Here is the new aspect function for possible inclusion in pylab.
It works great and with the default values for the kwargs, it works exactly the way I think it is useful for a combination of contouring and plotting.

What do you think, should we include this?


def aspect(*args, **kwargs):
    Set/Get the aspect ratio (ylength/xlength) of the current axis

    Aspect ratio is defined as unit-length-along-y-axis / unit-length-along-x-axis
    If no arguments are passed, the current aspect ratio is returned
    Aspect ratio may be met by changing size of axes while keeping data limits fixed (called 'box'),
    or by changing data limits while keeping the lengths of the axes fixed (called 'datalim')
    One point remains fixed, which is called the anchor, for example the center (called 'C')
    Autoscaling may be turned on (limits may change upon next plotting command)
    or off (limits will remain fixed)
    Keyword arguments:
    adjustable: 'box' (default), 'datalim'
    anchor: 'C' (default), 'SW', 'S', 'SE', 'E', 'NE', 'N', 'NW', 'W'
    fixlim: True (default), False

    ax = gca()
    if len(args)==0:
        aspect = ax.get_aspect()
    elif len(args)==1:
        aspect = args[0]
    adjustable = popd(kwargs,'adjustable','box')
    anchor = popd(kwargs,'anchor','C')
    fixlim = popd(kwargs,'fixlim',True)
    if fixlim:
    return aspect