Vertical alignment of a text

Flashmail

Dimension of a text in mpl is renderer-dependent in general.
Each renderer has “get_text_width_height_descent” method which returns
width, height, and descent of the given text.
If you’re only interested in latex-rendered text, you may use the
get_text_width_height_descent() method in the TexManager.

As you see, it is possible to know the dimension of the text, but
these functionalities are not exposed to the user, and a bit difficult

to use unless you’re familiar with mpl. If you let us know for what

you need to use the depth of the text, we may come up with some simple
solution.

Regards,

-JJ
Hello,

my purpose would be to align several formula for example.

Regrads,

Christophe.

va="baseline" does not work?

-JJ

···

On Thu, Jan 15, 2009 at 3:05 AM, <projetmbc@...748...> wrote:

Dimension of a text in mpl is renderer-dependent in general.
Each renderer has "get_text_width_height_descent" method which returns
width, height, and descent of the given text.
If you're only interested in latex-rendered text, you may use the
get_text_width_height_descent() method in the TexManager.

As you see, it is possible to know the dimension of the text, but
these functionalities are not exposed to the user, and a bit difficult
to use unless you're familiar with mpl. If you let us know for what
you need to use the depth of the text, we may come up with some simple
solution.

Regards,

-JJ

Hello,

my purpose would be to align several formula for example.

Regrads,

Christophe.