def catplot_abscissa(x_order, hue_order=None, xtype='center'):
    """
    Returns a dict that contains, for each possibly combination of x and hue
    values, the abscissa of the corresponding bar in any Facet of a
    seaborn 'bar' catplot called with x_order and hue_order as arguments. 
    
    Depending on the value of xtype, the abscissas of the center, left or right
    of the bars is returned.
    """
    assert xtype in ['center',  'left', 'right']
    delta = .5 if xtype=='center' else (0. if xtype=='left' else 1)
    origin = 0
    grp_stride = 1
    grp_width = .8
    if hue_order is None:
        nb_hues = 1
    else:
        nb_hues = len(hue_order)
    bar_width = grp_width/float(nb_hues)
    d = {}
    for i, xval in enumerate(x_order):
        if not(hue_order is None):
            for j, hval in enumerate(hue_order):
                d[xval, hval] =  origin + grp_stride*i - grp_width/2. +\
                                    (j+delta)*bar_width
        else:
            # if no hues, groups contain a single bar
            d[xval] = origin + grp_stride*i - grp_width/2. + delta*grp_width
    return d