[R] lines - defining the range that is plotted

Hermann Norpois hnorpois at gmail.com
Thu Sep 24 23:26:50 CEST 2015


Hello,

I am looking for a possibility to define something like ylim for lines. I
thought, there might be a possibility to define the range of lines by means
of par ("usr") but I did not find the correct syntax. In my toy example I
would like to stop the red line at y=0.3.
Thanks Hermann

toy example:

x <- seq (-3,3, by=0.1)
y1 <- dnorm (x)
y2 <- pnorm (x)
plot (x,y1)
lines (x,y2, col="red")

	[[alternative HTML version deleted]]



More information about the R-help mailing list