def get_bar_type_space(ax, plot_params):
    """
    Gets the amount of space to place in between the ends of bars and labels
    """
    # Estimate bar_type_space as a fraction of largest xlim
    x_width = 2 * abs(max(ax.get_xlim(), key=lambda x: abs(x)))
    bar_type_space = plot_params["bar_type_space_scaling"] * x_width
    return bar_type_space