You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug with configurable annotations: when repositioning annotation via click and drag, annotation gets duplicated. Seems to be an issue with specifying font attributes.
#2409
Open
ellenbouchard opened this issue
Dec 11, 2024
· 0 comments
I ran into what appears to be a bug with configurable annotations in R. Briefly, if just one annotation label is displayed on the plot, and I reposition the label by clicking and dragging, the annotation gets duplicated; one label is repositioned, and the other remains in its original position. If more than one annotation label is displayed, this does not happen.
After some investigating, I realized that this only happens if the "font" argument within "add_annotations" is a list of more than one element. So if I don't specify any "font" attributes, or specify only one font attribute (such as color or size), the bug does not occur. As soon as I specify multiple font attributes, the bug happens. I realize this may be a version thing but wanted to put it out there regardless.
Example here, code slightly modified from Text and Annotations in R : This code has a bug; the annotation label will be duplicated when repositioned
Hello,
I ran into what appears to be a bug with configurable annotations in R. Briefly, if just one annotation label is displayed on the plot, and I reposition the label by clicking and dragging, the annotation gets duplicated; one label is repositioned, and the other remains in its original position. If more than one annotation label is displayed, this does not happen.
After some investigating, I realized that this only happens if the "font" argument within "add_annotations" is a list of more than one element. So if I don't specify any "font" attributes, or specify only one font attribute (such as color or size), the bug does not occur. As soon as I specify multiple font attributes, the bug happens. I realize this may be a version thing but wanted to put it out there regardless.
Example here, code slightly modified from Text and Annotations in R :
This code has a bug; the annotation label will be duplicated when repositioned
This code, in which 'font' only has one element, does NOT have the bug; the annotation label will be repositioned normally
Session info:
The text was updated successfully, but these errors were encountered: