library(ggplot2)
m - ggplot(movies, aes(x=rating))
m + geom_histogram()
Now in x-axis instead of numbers like 2,4,6,8,10..., I want to write like
2%,4%,6%,8%,10%...
Is there any way to do that through GGPLOT ? Your help will be highly
appreciated.
Thanks,
--
View this message in context:
Hi,
I think you have two options:
1- use a specific formatter in scale_x_continuous, e.g.
last_plot +
scale_x_continuous(formatter=percent)
2- specify breaks and labels,
last_plot +
scale_x_continuous(breaks=c(2,6), labels=paste(c(2,6),%))
HTH,
baptiste
2009/12/7 Megh
2 matches
Mail list logo