Re: [R] Barplot + plot same scale

2010-01-07 Thread Samuel Dennis
Forget about two separate plots overlaid on each other. You are far better off using the lines function I expect. To obtain the centres of the bars for plotting, you need to record the output of the barplot as a variable and use that in your line graph. Try the following code: midpts <- barplot(c

[R] Barplot + plot same scale

2010-01-07 Thread Mister Vanhalen
Hello, I would like to plot : barplot(c(10,12,18)) and plot(c(0,2,3), t="l") and many other plots... in a same scale. With par(new=T) it's not align, points are not in the middle of the bar of barplot. Is there an easely solution to align that ? Thank for you help, G [[alternative