def horizontal_bar_plot(ax, Si, param_dict, sortby='mu_star', unit=''):
    
    assert sortby in ['mu_star', 'mu_star_conf', 'sigma', 'mu']
    
    fig = ax.get_figure()
    
    # Sort all the plotted elements by mu_star (or optionally another
    # metric)
    names_sorted = _sort_Si(Si, 'names', sortby)
    mu_star_sorted = _sort_Si(Si, 'mu_star', sortby)
    mu_star_conf_sorted = _sort_Si(Si, 'mu_star_conf', sortby)
    
    # Plot horizontal barchart
    y_pos = np.arange(len(mu_star_sorted))
    plot_names = names_sorted

    out = ax.barh(y_pos,
                  mu_star_sorted,
                  xerr=mu_star_conf_sorted,
                  align='center',
                  ecolor='black',
                  **param_dict)

    ax.set_yticks(y_pos)
    ax.set_yticklabels(plot_names)
    ax.set_xlabel(r'$\mu^\star$' + unit)    
    
    ax.set_ylim(min(y_pos)-1, max(y_pos)+1)

    return out
Updates a matplotlib axes instance with a horizontal bar plot
dataset/ETHPy150Open SALib/SALib/SALib/plotting/morris.py/horizontal_bar_plot