def truncate_xticklabels(plot, stop_index=30):
    """
    Truncate xtick labels with an ellipsis after `stop_index`
    """
    for label in plot.get_xticklabels():
        t = label.get_text()
        if len(t) < stop_index:
            continue
        else:
            label.set_text(t[:stop_index] + '...')
    
    return plot.get_xticklabels()