Automatic layouts are difficult to do in matplotlib. This was a design decision trade-off made early in its development. Instead of having matplotlib determining optimal layouts and such, the developers decided that it would be better to give the programmers full control over all placement, and merely establish good defaults.
Just for completeness, I like this page because it talks about the multiple different ways you can specify coordinates for a text object (and corresponding arrow) for placement:http://matplotlib.sourceforge.net/users/annotations.html
Knowing ahead of time how much space an annotation will take is very difficult, especially if your text involves any LaTeX symbols. However, it is possible. The Text object has some method calls that can return bounding boxes for the text object after it is made:
I haven't used these myself, so I don't know exactly what is the difference between them (I think they are different coordinate systems). Once knowing the size of your text object, you can change the position of the object using its set_position() method. It is tricky, but if positioning and layout is very important to you, it is possible to do.
I hope this helps!