handles, labels = plt.gca().get_legend_handles_labels() labels_to_skip = len(group_names) plt.legend(handles[labels_to_skip:labels_to_skip + 2], labels[labels_to_skip:labels_to_skip + 2])