from math import ceil, floor


def get_ax_lim(ax_min, ax_max, base=10):
    """
    Get axis limit

    Parameters
    ----------
    ax_min : float
    ax_max : float
    base : int, default = 10

    Returns
    -------
    ax_min : float
    ax_max : float
    """

    ax_min = floor(ax_min * base) / base
    ax_max = ceil(ax_max * base) / base
    return ax_min, ax_max