We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This StackOverflow question https://stackoverflow.com/q/61888967/2554330 motivated this report.
If the labels in scale_x_discrete are a factor, ggplot works fine. This is okay:
scale_x_discrete
ggplot
ggplot(diamonds, aes(cut)) + geom_bar() + scale_x_discrete("Cut", labels=factor(letters[1:5]))
However, ggplotly() fails:
ggplotly()
ggplotly( ggplot(diamonds, aes(cut)) + geom_bar() + scale_x_discrete("Cut", labels=factor(letters[1:5])) ) #> Error in nchar(axisObj$ticktext): 'nchar()' requires a character vector
Apparently an as.character() call is needed when ticktext is constructed.
as.character()
ticktext
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
This StackOverflow question https://stackoverflow.com/q/61888967/2554330 motivated this report.
If the labels in
scale_x_discrete
are a factor,ggplot
works fine. This is okay:However,
ggplotly()
fails:Apparently an
as.character()
call is needed whenticktext
is constructed.The text was updated successfully, but these errors were encountered: