par(xpd=T)
bp- barplot(matrix(1:50,5,10),names=F)
text(bp,-2,c('these labels','are tooo','looong'),pos=2,srt=45)
Xiaogang Yang 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
#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
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
On Sep 7, 2009, at 5:03 PM, Xiaogang Yang 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
It depends on the particular function and bar plot is insufficiently
specified to be
4 matches
Mail list logo