Please tell me how to format data in a data frame so when currency amount is displayed in a chart the axis tick labels contain leading $ signs. Please also tell me if it is possible to rotate x axis labels using ggplot2. Thank you, Kurt
Hi Kurt,> Please tell me how to format data in a data frame so when currency amount is displayed in a chart the axis tick labels contain leading $ signs.The easiest way is add a custom scale: vals <- seq(0, 100, by = 10) qplot(...) + scale_x_continuous(breaks = vals, labels = paste("$", vals, sep = ""))> Please also tell me if it is possible to rotate x axis labels using ggplot2.Not easily, but there will be in the next version. Hadley -- http://had.co.nz/
Reasonably Related Threads
- R help, labeling the tick marks as I want
- ggplot2: changing axis labels in ggplot()
- ggplot question: changing the label for the Y axis on a histogram
- xyplot, the first tick mark starts from 2 rather than 1, and also there is a NA as the final tick mark.
- Adding vertical line to histogram and qplot "stacked" plot