Skip to content

Instantly share code, notes, and snippets.

@hadley
Created July 23, 2020 12:48
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hadley/a1155600d0c7d694bd93393ee8c54508 to your computer and use it in GitHub Desktop.
Save hadley/a1155600d0c7d694bd93393ee8c54508 to your computer and use it in GitHub Desktop.
library(ggplot2)
x <- c("بقرة", "دجاج", "حصان")
df <- data.frame(x = x, y = 1:3)
labels_rtl <- function(x) paste0("\u202B", x)
ggplot(df, aes(x, y)) +
geom_point() +
scale_x_discrete(labels = labels_rtl) +
theme_grey(20) +
labs(x = NULL, y = NULL)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment