简体   繁体   中英

How to avoid overlapping of labels in timeline plot

中心标签重叠 Hey everyone, i use the plot example from https://matplotlib.org/gallery/lines_bars_and_markers/timeline.html Code is similar from the example there. Just some different values for the list names and dates.

Now i have got the problem, as shown in the picture below that some of the labels overlap. How can I avoid that? It is not the only plot of that kind i will make so it would be great to find a way that it works for any data input.

I already adjusted the space between the x-axis elements but I do not know how to fix that problem with the labels.

Found the solution thanks to the reply of @ImportanceOfBeingErnest. My 2 input lists where not sorted by date.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM