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?
to your account
I can't seem to get the axis text showing unicode, but when i try it in geom_text it shows up just fine.
Is there a way to do this or...?
ggdata <- data.frame(text = c("text 1", "text <U+2665>", "text ♥"), value = c(1, 3, 5), stringsAsFactors = FALSE)
ggplot(data = ggdata, aes( x = text, y = value, label = text)) + geom_bar(stat="identity") + geom_text(nudge_y = 1)
The text was updated successfully, but these errors were encountered:
It works for me, but you're probably on windows. Can you please confirm the simpler reprex below still illustrates the problem for you?
df <- tibble::tibble(x = c("a", "♥"))
ggplot(df, aes(x, x)) +
geom_text(aes(label = x))
Sorry, something went wrong.
The problem is stil there. And yes, I'm one a Windows - just tried to run your code on a linux server I have, and there it worked fine.
The root cause seems to be a buglet in R. On windows, I see:
x <- c("a", "♥")
#>  "a " "<U+2665>"
Ok, pretty sure I fixed it, just by avoiding the use of format() (which I'm not sure why was necessary in most cases anyway). Please let me know if this doesn't fix the problem.
Works! Thanks :-)
No branches or pull requests