Re: [R] How to increase lenght of axis according input data?

2012-08-01 Thread Jean V Adams
You could use the xlim argument to barplot. For example, barplot(t(data[,2:3]), beside=TRUE, xlim=c(0, 20), col=c(rgb(.537, .769, .933), rgb(.059, .412, .659)), width=1, horiz=TRUE, cex.names=.9, border ="white", las=1, cex.axis=1, cex.lab=1.2) Jean Manish Gupta wro

Re: [R] How to increase lenght of axis according input data?

2012-08-01 Thread Anders Ellern Bilgrau
Hello, Here's a quick and dirty solution. By setting axes = FALSE in the barplot plot arguments we suppress the axes. You then use the axis function afterward to draw the desired axis. Below, i have also used the pretty function. Have a look at this: data <- rbind(c(3,4,6), c(5,15,19)) pdf("i

[R] How to increase lenght of axis according input data?

2012-08-01 Thread Manish Gupta
Hi, I am working on barplot. I need to plot x-axis but scale on x axis is very upto 15 while my data is upto 19. pdf("image.pdf", width=10 , height =13) par(mar=c(5,22.5,2,2)) barplot(t(data[,2:3]), beside=TRUE, col=c(rgb(.537, .769, .933),rgb(.059, .412, .659)), width = 1, horiz=TRUE,cex.name