def center_x(cell_lower_left_x, cell_width, word_length, correct_for_length=False):
    """ This function centers text along the x-axis

    :param cell_lower_left_x: Lower left x-coordinate
    :param cell_width: Width of cell in which text appears
    :param word_length: Length of plotted word
    :param correct_for_length: takes into account word length
    :return: Centered x-position
    """

    if correct_for_length:
        x_center = cell_lower_left_x + (cell_width/2) - (word_length / 2.0)
    else:
        x_center = cell_lower_left_x + (cell_width / 2)

    return x_center