def _get_plotting_function(ax, plot_function_str, valid):
    """Get the plotting function to utilize.

    Warnings
    --------
    This method is intended for internal use only.

    """
    plotting_functions_dict = {'plot': ax.plot, 'semilogx': ax.semilogx,
        'semilogy': ax.semilogy, 'loglog': ax.loglog}
    if (plot_function_str not in plotting_functions_dict or 
        plot_function_str not in valid):
        raise ValueError(
            "'{0}' not a valid plotting option. Must be one of the following options: '{1}'."
            .format(plot_function_str, valid))
    return plotting_functions_dict[plot_function_str]
