python:plt
This is an old revision of the document!
def legend_without_duplicate_labels(ax): handles, labels = ax.get_legend_handles_labels() unique = [(h, l) for i, (h, l) in enumerate(zip(handles, labels)) if l not in labels[:i]] ax.legend(*zip(*unique))
python/plt.1674559338.txt.gz · Last modified: 2023/01/24 14:22 by a.boev