def _calc_data_point_ticks(x_locations, num_distributions,
    distribution_width, distribution_centered):
    """Returns a 1D numpy array of x-axis tick positions.

    These positions will be centered on each data point.
    
    Set distribution_centered to True for scatter and box plots because their
    plot types naturally center over a given horizontal position. Bar charts 
    should use distribution_centered = False because the leftmost edge of a bar
    starts at a given horizontal position and extends to the right for the
    width of the bar.
    """
    dist_size = (num_distributions - 1 if distribution_centered else
        num_distributions)
    return x_locations + dist_size * distribution_width / 2
