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

check.overlap = TRUE throws error #165

Closed
jobstdavid opened this issue Aug 27, 2024 · 1 comment
Closed

check.overlap = TRUE throws error #165

jobstdavid opened this issue Aug 27, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jobstdavid
Copy link

jobstdavid commented Aug 27, 2024

Dear Teun van den Brand,

Thank you for this very nice package! However, I discovered that the function guide_axis_color throws an error, when check.overlap = TRUE is specified. I provide a minimal example (for which check.overlap = TRUE is not really necessary) to illustrate the error:

p <- ggplot(mtcars, aes(wt, mpg)) +
  geom_point() +
  theme(axis.line = element_line(colour = "black"))

p + guides(x = guide_axis_colour(colour = "red", check.overlap = TRUE),
           y = guide_axis_colour(colour = "blue"))

This code yields to the error message Error in FUN(X[[i]], ...) : object 'n' not found. Do you maybe know how to fix it?
Thank you very much in advance!

Best,
David

@teunbrand
Copy link
Owner

Hi there, thanks for the report! This appears to be a bug. I don't know of a workaround at the moment, other than not using the check.overlap option or replacing the colours in the theme yourself.

@teunbrand teunbrand added the bug Something isn't working label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants