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

scales 1.0.0 change to hue_pal() breaks fbplot #1

Closed
dpseidel opened this issue Jul 28, 2018 · 2 comments
Closed

scales 1.0.0 change to hue_pal() breaks fbplot #1

dpseidel opened this issue Jul 28, 2018 · 2 comments

Comments

@dpseidel
Copy link

The upcoming scales 1.0.0 release includes some minor changes to hue_pal() that according to my revdep checks will break the multivariate boxplot example used in the documentation of fbplot() and your vignette. The error seems to be cause at L572 where you call hue_pal()(length(ID_out)). With scales 0.5.0 this returned an empty string where as in the newest version it fails, returning the error Error: Must request at least one colour from a hue palette. because length(ID_out) == 0.

The release is expected out by next week, and I wanted to give you a heads up about this minor breaking change.

@dpseidel
Copy link
Author

Some more information: the change was made in r-lib/scales#81 so that arguments hue_pal arguments are forcibly evaluated on each call. This is the appropriate behavior but before the change, arguments to hue_pal() inside a for loop (as is your case at L572) wouldn't be evaluated until the end of the loop -- preventing the error associated with hue_pal()(0) and outputting an empty character vector rather than an error. The fix will simply need to involve proper handling of 0 lengths at L572.

@astamm
Copy link
Owner

astamm commented Jan 28, 2022

Thanks @dpseidel. I have taken over the maintenance of the package. I will provide a fix soon.

ntarabelloni pushed a commit that referenced this issue Jan 31, 2022
add depthgram and depthgramplot
@astamm astamm closed this as completed Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants