#Example data df <- data.frame(trt = factor(c("A long label", "Another long \n label")), outcome = c(1,4))
#Install ggplot2 if needed library(ggplot2) p <- ggplot(df, aes(y=outcome, x=trt)) p <- p + geom_bar(position="dodge", stat="identity") p <- p + opts(axis.text.x = theme_text(angle = 45, hjust=1)) p On Mon, Sep 7, 2009 at 5:03 PM, Xiaogang Yang <gavinxy...@gmail.com> wrote: > Hi, everyone: > I am plotting an graph with bar plot, but the label after every bar is too > long, I wanna if I can draw the label lean to an angle > thanks > > -- > Xiaogang Yang > Sensorweb Research Laboratory > http://sensorweb.vancouver.wsu.edu/ > Washington State University Vancouver > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.