If you want to automatically adjust annotations in a matplotlib plot for readability, use the library adjustText.
Link to adjustText.