In the FAQ, there is an entry about adjusting subplot parameters to make room for really long tick labels:
I made the example a little more general and included a utility function that takes care of tick labels and other objects on all sides of the graph (the example only corrects for overflows on the left). This code might be nice to go into the FAQ. I've attached the code. Please use it if you think it is good.
makeroom.py (2.16 KB)