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

Blank label error #47

Open
fmarotta opened this issue Dec 30, 2024 · 0 comments
Open

Blank label error #47

fmarotta opened this issue Dec 30, 2024 · 0 comments

Comments

@fmarotta
Copy link

Hi! geom_marquee() errors out when the label is empty or contains only blank characters. The error message is not too informative, either. In comparison, geom_text() and geom_label() do not complain and print the label even if it's blank.

library(ggplot2)
library(marquee)
ggplot(data.frame(x = 0, y = 0, label = "")) +
  geom_marquee(aes(x, y, label = label))
#> Error in `geom_marquee()`:
#> ! Problem while converting geom to grob.
#> ℹ Error occurred in the 1st layer.
#> Caused by error in `if (nrow(x$shape) > 0) ...`:
#> ! argument is of length zero

Created on 2024-12-30 with reprex v2.1.1

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

1 participant