-
-
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
'ggpp' position functions (former code from 'ggpmisc') working fine #227
Comments
Thanks for letting me know! It'd be wonderful to see a documentation page with examples of how to use them together. Maybe one day I might have time to write one if it doesn't exist yet. |
A documentation page is in my todo list. I will let you know when it is done. I have been recently playing in 'ggpp' and implemented justification computed based on the displacement introduced by the postion functions (e.g. very useful with radial nudging). Still only in GitHub, not CRAN, but seems to work reasonably well and is easy to implement using the justification computing function that I contributed to 'ggplot2' (now also used in 'ggrepel'). Of course, it only works if the original position is kept. This could be useful to have in 'ggrepel' when using both packages together. Once polished in 'ggpp' I will make a pull request in 'ggrepel'. There would be no need to change any defaults, just make one more option available. |
Awesome!! Looking forward to this, thank you! |
@slowkow I intend to submit 'ggpp' 0.5.0 to CRAN in about a week. I reorganized the vignette into two sepearte vignettes, with one of them focusing on using 'ggpp' together with 'ggrepel', and the other one with a focus on 'ggpp' used on its own. The sources are in GitHub, and the built documentation website is at https://docs.r4photobiology.info/ggpp/ with the vignette "Combining repulsion and nudging" at https://docs.r4photobiology.info/ggpp/articles/nudge-examples.html. If you happen to have time, I would appreciate your comments/ideas for improving it. |
🤩 The vignette looks really good! I will take a closer look through it and send comments. I definitely need to update ggrepel docs to mention the ggpp functions. Maybe I might copy a short example from your vignette as a teaser and then link to your page? Users will appreciate all the work you put into this! |
@slowkow Tahnks! Feel free to copy as much as seems useful, or to link to 'ggpp's online docs. I look forward to your comments. |
@slowkow
I have realized, that implementing such a position function in 'ggrepel' in the same way as in 'ggpp' is not possible. Implementation would be much more complex as the justification would be affected by repulsion, so justification would need to be recomputed at each iteration. It is likely that at some unpredictable point during iterations the bounding box could be displaced by the the height or width of the boundibg box as a result of a change in justification. |
@slowkow I tested 'ggpp' position functions with 'ggrepel' from GitHub and they work just fine under 'ggplot2' 3.4.0-rc. I also tested
position_nudge_repel()
with the geoms from 'ggpp' and this also works as expected. I tested against the GitHub version of 'ggpp'. I added testthat test cases to 'ggpp' to test intercompatibility with 'ggrepel', and these are run as actions when I commit changes to 'ggpp'. I haven't added the visual tests to the version of 'ggpp' submited to CRAN.So this issue is to report that all seems to be well. Thanks for helping with making our packages work together!
The text was updated successfully, but these errors were encountered: