Axis Length

Is there any way to get the length (in pixels) of a
particular axis?

More specifically I am trying to make a clean-looking Formatter
object that spaces out the labels so that the text does not write on top of
each other, but in order to do so, I need to know the length of the Axis that
the Formatter object is being applied to. Is there any easy (or proper)
way to do this?

While I am on the topic, are there any ways to get the pixel
size of a string if it were to be rendered as text? I know that Qt can do
this, but I wasn’t sure if the matplotlib backend system has this
implemented to make it generic for all backends. Right now I just have a
hard-coded parameter for this, but it would be nice to make more automatic.


–James Evans