# NOT RUN {
# Point all labels to upper right corner
ggplot(mtcars, aes(mpg, wt)) +
geom_text_aimed(aes(label = rownames(mtcars)),
xend = Inf, yend = Inf)
# Point all labels to center of polar plot
ggplot(mpg, aes(manufacturer)) +
geom_bar(width = 1, aes(fill = manufacturer), show.legend = FALSE) +
geom_text_aimed(aes(label = manufacturer), hjust = 0,
stat = "count", nudge_y = 2) +
scale_x_discrete(labels = NULL) +
coord_polar()
# }
Run the code above in your browser using DataLab