plot - R: abline does not add line to my graph -


i try draw line graph using r. lines have been plotted, abline line doesn't show up.

m <- c(1.0,1.5,2.0,2.5,3) y <- c(0.0466,0.0522,0.0608,0.0629,0.0660) plot(m, y, type="l", col="red", xlab="sdr",      ylab="simulated type error rate") abline(h=c(0.025,0.075),col=4,lty=2) 

this simple coding graph. ways make line pop out?

try instead:

m <- c(1.0,1.5,2.0,2.5,3) y <- c(0.0466,0.0522,0.0608,0.0629,0.0660) plot(m, y, type="l",col="red",xlab="sdr", ylim = c(0.025, 0.075),      ylab="simulated type error rate") abline(h=c(0.025,0.075),col=4,lty=2) 

by using ylim.

i refer read answer post: curve() not add curve plot when “add = true” more setting ylim when plotting several objects on graph.


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -