Overlapping Text Matplotlib.text

Viewed 59

I am trying to add text descriptions to vertical lines that are present in my plot but the descriptions are overlapping. Here is my attempt to solve the issue:

    for date in df['Date'].values:
        ax.axvline(date, c = "black")
        for desc in df['Description'].values:
            for index in df['Date'].index:
                plt.text(df['Date'][index], index, desc)

enter image description here

The placement is not physically overlapping anymore but it seems that the text still is?

0 Answers
Related