meaulnes
meaulnes

Reputation: 383

How to align end of texts or annotations in matplotlib?

I would like to achieve the following figure I can easily realize in gnuplot but, this time, using matplotlib :

enter image description here

On the right side (here "Recettes"), after reading the documentation, I am confident I can do it easily.

But on the left side, I have to align the ends of the textes and I cannot see any parameters in annotate() or text() function to achieve this. Any idea would be welcome.

Upvotes: 15

Views: 11617

Answers (1)

swatchai
swatchai

Reputation: 18782

You can specify horizontalalignment or ha with one of these [ ‘center’ | ‘right’ | ‘left’ ] as one of the keyword arguments (**kwargs).

See ref here.

Upvotes: 19

Related Questions