Skip to content
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

Tries to make enormous image when passed annotations instead of texts #7

Open
alphapapa opened this issue Oct 20, 2016 · 12 comments
Open

Comments

@alphapapa
Copy link

Hi again, quick bug report: when I pass adjust_text a list of annotations made with plot.annotate(), it tries to make an enormous image, over 900,000 pixels wide. When I switched to passing it a list of objects made with plot.text(), it worked. I think this is probably a bug, but I'm not sure. Thanks.

@Phlya
Copy link
Owner

Phlya commented Oct 21, 2016

Hi again, this is not a bug, it's currently not intended to work with annotation objects, but would be great to make this possible. I don't have time to work on this now, but would be happy to consider a PR for this.

@alphapapa
Copy link
Author

Okay, thanks. I probably don't have time to work on it either right now, but maybe someday... I'm pretty new to matplotlib, so could you describe briefly what the differences would be in handling annotation objects instead? How complex would it be to use them instead?

@Phlya
Copy link
Owner

Phlya commented Oct 22, 2016

Should be quite similar, you just need to figure out how to get bbox of the text part of the annotation...

@alphapapa
Copy link
Author

Ok, thanks. I might take a look at this again in a few weeks. :)

@Phlya
Copy link
Owner

Phlya commented Oct 25, 2016

Shouldn't be too complex I guess... You just need to get bbox from the text
of the annotation, not the whole annotation, I guess it should be possible
somehow.

2016-10-22 5:15 GMT+01:00 alphapapa [email protected]:

Okay, thanks. I probably don't have time to work on it either right now,
but maybe someday... I'm pretty new to matplotlib, so could you describe
briefly what the differences would be in handling annotation objects
instead? How complex would it be to use them instead?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#7 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACwsuty2qaKTnFnTIuqpwmQm0hyig-Wbks5q2Y39gaJpZM4KcgMx
.

@y9c
Copy link

y9c commented Oct 5, 2018

Is there already any RP for this feature request?

@Phlya
Copy link
Owner

Phlya commented Oct 5, 2018 via email

@y9c
Copy link

y9c commented Oct 6, 2018

For annotating line-line intersection, it is much clear to use annotation instead of text, meanwhile customizing the background of bbox make the label more obvious.

image

@y9c
Copy link

y9c commented Oct 6, 2018

Another case of annotation label

before
image

after
image

Manually adjusting the annotation label make it meaningful.


For text label,

after adjustText
image

In spite of the location of text label is adjusted, it will mess up either. Cause there is no boarder for numbers, when the digits are too close, it is difficult to distinguish.

eg

123 45 vs 12 345

@y9c
Copy link

y9c commented Oct 6, 2018

The main difference between ax.text and ax.annotation is that the text is for points only and annotation is suitable for higher dimension geometric elements.

@Phlya
Copy link
Owner

Phlya commented Oct 6, 2018 via email

@Conceptron
Copy link

Hi, is there any workaround for this? Maybe a snippet to get the text from annotations would help. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants