def _convert_axis_scale(axis_scale):
    """Convert the given axis scale (e.g. "log") to one that can be used by Matplotlib.

    References:
        - https://matplotlib.org/api/_as_gen/matplotlib.axes.Axes.set_xscale.html
        - https://matplotlib.org/api/_as_gen/matplotlib.axes.Axes.set_yscale.html
        - https://matplotlib.org/gallery/lines_bars_and_markers/categorical_variables.html
    """
    possible_axis_scale = ['lin', 'linear', 'log', 'logarithmic', 'cat',
        'categorical']
    if axis_scale is None:
        returned_axis_scale = 'linear'
    elif axis_scale == 'linear' or axis_scale == 'lin':
        returned_axis_scale = 'linear'
    elif axis_scale == 'logarithmic' or axis_scale == 'log':
        returned_axis_scale = 'log'
    elif axis_scale == 'categorical' or axis_scale == 'cat':
        returned_axis_scale = 'linear'
    else:
        raise ValueError(
            'Invalid value for axis scale: "{}". Possible values: {}'.
            format(axis_scale, possible_axis_scale))
    return returned_axis_scale
