ggpp icon indicating copy to clipboard operation
ggpp copied to clipboard

Support dodging and jitter in `position_nudge_to()`

Open aphalo opened this issue 11 months ago • 1 comments

This can be based on the code in position_dodgenudge() and position_jitternudge(). Dodge and jitter are applied before nudging. We do not need a new function, by default we can skip dodging so as to keep the current default behaviour. To ensure that user code passing x and y is not broken and that the new functionality is visible in the name, a wrapper function with the current name and signature can be defined.

  • [x] Implement position_dodgenudge_to()
  • [x] Add examples to the documentation.
  • [x] Add unit tests with dodging.
  • [x] Implement position_nudge_to() as a wrapper.
  • [x] Test with existing unit tests.
  • [x] Implement position_dodge2nudge_to()
  • [x] Add examples to the documentation.
  • [x] Add unit tests with dodging.
  • [x] Implement position_stacknudge_to()
  • [x] Add examples to the documentation.
  • [x] Add unit tests with stacking.
  • [x] Implement position_fillnudge_to()
  • [x] Add examples to the documentation.
  • [x] Add unit tests with stacking.
  • [ ] Implement position_jitternudge_to()
  • [ ] Add examples to the documentation.
  • [ ] Add unit tests with jitter and nudge to.
  • [x] Revise README (table of positions).
  • [ ] Revise vignettes (table of positions + examples).
  • [ ] Revise vignette on combining 'ggrepel' and 'ggpp'.
  • [ ] Move vignette on combining 'ggrepel' and 'ggpp' to articles.

aphalo avatar Feb 17 '25 23:02 aphalo

This is a preliminary implementation based in existing code, not yet addressing #56 and #58.

aphalo avatar Feb 24 '25 23:02 aphalo