laresbernardo / lares

Analytics & Machine Learning R Sidekick
https://laresbernardo.github.io/lares/
233 stars 49 forks source link

geom_text_repel() as substitution for geom_text() #42

Closed bookerbn1 closed 1 year ago

bookerbn1 commented 1 year ago

Have you considered using ggrepel::geom_text_repel() for the labeling the highest correlations in the local plot instead of geom_text() to prevent overlapping labels?

image

laresbernardo commented 1 year ago

Hi @bookerbn1 thanks for the feedback. Yes, I've actually considered it but I tend to avoid adding more dependencies to the package. You could modify it manually though by playing with the ggplot object the function returns.

bookerbn1 commented 1 year ago

Thanks for the response. That is what I ended up doing: gginnards::delete_layers(g, "GeomText") and then adding in my own labels. Just thought I would through it out there :) Absolutely love the package.

laresbernardo commented 1 year ago

Thanks for your comment and for sharing your solution @bookerbn1! Pretty useful for follow-ups. Cheers!