Phlya / adjustText

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

New get_renderer() function that should function with more backends and matplotlib versions #149

Closed oliver-s-lee closed 1 year ago

oliver-s-lee commented 1 year ago

Hi there, nice code!

I'm running into problems on my machine with using non-pyplot graphs because neither get_renderer() nor renderer is available. I've written a small update based on the matplotlib functions in backend_bases.py (also based on this question) which should support most backends and matplotlib versions. Hope it's useful!

Phlya commented 1 year ago

Nice, thank you! I hope this can fix the problems some people are indeed having with this... I don't know why it's so complicated in matplotlib, they should standardize the backends I guess!