-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Left-align text but not label boxes #200
Comments
Thanks for the reprex and suggestions! This could be a bit tricky. It might be necessary to follow your suggestion and break the one option |
Sure, thanks for all your work on this great package! I am also not sure about the names. hjust usually applies to text so maybe stick to it. However, it's just a box when using |
In general justification in 'ggplot2' does not shift the position of the point to which a label is referenced, it shifts the position of the label with respect to the point. I think this enhancement would make behaviour consistent with 'ggplot2' but should be optional as it could break user code... (possibly default only for |
Summary
When forcing
geom_text|label_repel()
to draw vertical lines, one needs to usehjust = 0.5
. Unfortunately, this argument applies justification to both the text and the textbox.Minimal code example
Created on 2021-07-14 by the reprex package (v1.0.0)
Suggestions
It would be great to have two
hjust
arguments to control both individually, e.g. the traditionalhjust
orlabel.hjust
to justify the text and another e.g.box.hjust
to adjust the placement of the text or textbox.Version information
The text was updated successfully, but these errors were encountered: