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

keep radiated labels within plotting window #1

Open
corybrunson opened this issue Sep 21, 2018 · 3 comments
Open

keep radiated labels within plotting window #1

corybrunson opened this issue Sep 21, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@corybrunson
Copy link
Owner

Currently, geom_text_radiate() adjusts hjust internally to shift text away from arrowheads, but the plotting window does not account for this.

library(ordr)
pca <- prcomp(USPersonalExpenditure, center = FALSE)
pca_ord <- as_tbl_ord(pca)
pca_ord <- confer_inertia(pca_ord, c(.5, .5))
ggbiplot(pca_ord, aes(label = .name)) +
  theme_bw() +
  geom_v_vector() +
  geom_v_text_radiate() +
  geom_u_point()

plot

@corybrunson corybrunson added the bug Something isn't working label Jul 27, 2019
@corybrunson
Copy link
Owner Author

This has been resolved in the best way currently possible in 5c5b9d1, by allowing clip = FALSE to be passed to ggbiplot() and thence internally to coord_equal().

@corybrunson
Copy link
Owner Author

The expand_limits() layer seems to resolve this issue more elegantly, i.e. without conflicting with the scale_*_continuous() calls inside ggbiplot(); though ultimately those internal calls should be replaced with more direct steps that don't conflict even with downstream scale_*_continuous() layers.

@corybrunson
Copy link
Owner Author

This issue may be fixed via #34.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant