You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upgrading to version 3.10 of ggplot2 I encountered a strange behaviour
with regards to non-ascii (utf-8) characters in labels.
In some cases ggplot will wrap the labels with backticks. In other cases
(with the same character) it will not. I have been examining this and it
seems that the strange behaviour only occurs when the non-ascii character
isn't the first one in the string. Thus in the example below when mán is the variable on
the x axis it gets wrapped but ár does not.
# pseudo data with the same non-ascii letter in two different locations.>df=data.frame(ár=rep(1991:2000,each=12),mán=rep(1:12,10))
>df$hiti=with(df,ár/2000+10* sin(mán/12*2*pi) + rnorm(120))
> library(ggplot2)
> ggplot(data=df,aes(mán,hiti)) + geom_point()
> ggplot(data=df,aes(ár,hiti)) + geom_point()
The text was updated successfully, but these errors were encountered:
Thanks for reporting, this is already fixed in the dev version by #2981. You can try the dev version by devtools::install_github("tidyverse/ggplot2"), or set labels manually (e.g. xlab()).
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/
lockbot
locked and limited conversation to collaborators
May 26, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Upgrading to version 3.10 of ggplot2 I encountered a strange behaviour
with regards to non-ascii (utf-8) characters in labels.
In some cases ggplot will wrap the labels with backticks. In other cases
(with the same character) it will not. I have been examining this and it
seems that the strange behaviour only occurs when the non-ascii character
isn't the first one in the string. Thus in the example below when mán is the variable on
the x axis it gets wrapped but ár does not.
The text was updated successfully, but these errors were encountered: