Phlya / adjustText

A small library for automatically adjustment of text position in matplotlib plots to minimize overlaps.
https://adjusttext.readthedocs.io/
MIT License
1.5k stars 87 forks source link

Various colours to labels #41

Open wwwwwww123 opened 6 years ago

wwwwwww123 commented 6 years ago

Hi, how do we assign different colours to different letters in the same text label using adjust Text?

Phlya commented 6 years ago

Hi, is it possible in matplotlib at all?..

wwwwwww123 commented 6 years ago

Yes, it is possible if we were to use annotate(). I attempted with adjust_text but it didn't seemed to work. So I was wondering if there is a way to do this?

Phlya commented 6 years ago

Just curious - how exactly can you do it? If you have to use annotate and not text, it is currently not possible with adjustText, I am afraid...

wwwwwww123 commented 6 years ago

One example is using \textcolor[HTML]{0BFF01}{Text to colour}.

Phlya commented 6 years ago

Mmm can please you give a concrete example with code?