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

Bug in handling nudge that is a "long" vector #47

Open
aphalo opened this issue Dec 25, 2023 · 1 comment
Open

Bug in handling nudge that is a "long" vector #47

aphalo opened this issue Dec 25, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request on hold To be reconsidered at a later time

Comments

@aphalo
Copy link
Owner

aphalo commented Dec 25, 2023

The most logical approach with the nudge argument would be to accept numeric vectors of any length and recycle them. One case works after today's edits correctly with three position functions: position_nudge_keep(), position_nudge_to() and position_nudge_center(). This case is when x or y are longer than 1, but shorter than the number of rows in data. In this case not only recycling needs to be done but also reordering so as to support the frequent use case of nudging labels alternatively in opposite directions or by different distances. This is an effective approach to reduce overcrowding.

Another case that needs to be handled with a warning is when the x or y vectors are longer that rows are present in data. This needs to be implemented in all the nudging position functions.

This needs to be also implemented in the remaining position functions that support nudging.

@aphalo aphalo added the bug Something isn't working label Dec 25, 2023
@aphalo aphalo added this to the Version 0.5.6 milestone Dec 25, 2023
@aphalo aphalo self-assigned this Dec 25, 2023
@aphalo
Copy link
Owner Author

aphalo commented Dec 26, 2023

This is now implemented and unit tests added. However, when a factor is mapped to one of x or y the ordering does not work as expected. I put this on hold for now.

@aphalo aphalo added enhancement New feature or request on hold To be reconsidered at a later time and removed bug Something isn't working labels Dec 26, 2023
@aphalo aphalo modified the milestones: Version 0.5.6, Future version Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request on hold To be reconsidered at a later time
Projects
None yet
Development

No branches or pull requests

1 participant