[R] Plotting more errorbar-functions in one plot

Hedwig Franziska Maria Zimmerer hfz at rzg.mpg.de
Thu May 3 13:00:12 CEST 2007


Hello,

it´s new for me tu use R for my statistics analysis, so I need some help.

The problem is:
I want to plot errorbar-functions from two measurements in one 
coordinate-system. For that I use the following code:
>library(sfsmisc)
>errbar(XAchse,Means,Mins,Maxs,xlab="",ylab="",xlim=range(0,100)) 
>lines(XAchse,Means)
>par(new=TRUE)   
>errbar(XAchse,MeansN,MinsN,MaxsN,xlab="",ylab="",xlim=range(0,100))  
>lines(XAchse,MeansN)

My problem is, that I want to have the same scaling on the x-axis, but I don´t 
know, what I have to do for that.

If I say:
>errbar(XAchse,MeansN,MinsN,MaxsN,xlab="",ylab="",xlim=range(0,100), ylim= 
yrange(0,10000))  
I get the following error:
	<Error in plot.default(x, y, ylim = range(y, yplus, yminus), xlab = xlab,  :
        	formal argument "ylim" matched by multiple actual arguments

I tried a lot of things, but nothing helped.



More information about the R-help mailing list