-
Notifications
You must be signed in to change notification settings - Fork 86
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
Get final text coordinates #112
Comments
import matplotlib.pyplot as plt
from adjustText import adjust_text
import numpy as np
import pandas as pd
np.random.seed(0)
x, y = np.random.random((2,30))
fig, ax = plt.subplots()
plt.plot(x, y, 'bo')
texts = [plt.text(x[i], y[i], 'Text%s' %i) for i in range(len(x))]
print(texts)
adjust_text(texts)
print(texts) you will find two different result , and the final one is what you want. |
While the actual issue is solved with above, I'm curious about the possibility adjustText could be used in other packages @starfriend10 could you clarify your usecase? With the new engine it will be very simple to move just the logic into a separate function that could be used for any similar situation. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, good package!
Can I get the text coordinates? So I can reuse the coordinate data to plot texts using other packages (not Matplotlib)?
Or, can I use the package without the support of Matplotib?
Thank you.
The text was updated successfully, but these errors were encountered: