-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backends to use in a multithreaded environment #157
Comments
Hi Paulin, This is interesting. I thought adjustText should work with all backends. I don't know how to answer your question, it requires some experimentation... Can you provide an example of code that doesn't work with Agg? Texts going to (0,0) is an indication that the axes limits are not set up prior to calling |
Thank you for swift response Ilya! I've tried the fix and it didn't change anything unfortunately. I've also tried plt.show() (I was using plt.savefig() before) and it didn't help too I'll try making up a minimal example later today. I'm sure that I'm setting the axes limits though, I've seen this suggestion in other issues. Because my axes limits don't start from (0, 0) I'm sure that it's being applied, because it's obvious in my case. |
Hi again Ilya, I'm very sorry because my initial question was misleading. My problem was something totally unrelated - one line missing from the code. But I still can't explain to myself, why exactly it had this effect. It appears that if I only draw labels without any plot, they start misbehaving - please see my example below. Maybe I've discovered another bug (or that's WAI?).
With the scatter plot drawing it looks like this: https://ibb.co/TLPbn6H |
Set the axes limits before calling adjust_text, then it should work as expected. scatterplot sets axes limits to something reasonable, and that's why texts are adjusted correctly. |
Hello and thank you for this very useful package!
As I understood, some backends in matplotlib don't work well in frameworks using threading, like Django. It can be solved by selecting a different backend (e.g.
matplotlib.use("Agg")
).But "Agg" backend doesn't work with adjust Text - all labels just go to (0, 0) point. Can you please list specifically which backends are supported/not supported with adjustText, and if possible - which ones are compatible with threading.
Environments of my particular interest are MacOS and Debian.
The text was updated successfully, but these errors were encountered: