Try this: > LinePlot(1,1) > LinePlot=function(a,b){ + # a = slope + # b = y intercept + x=seq(-10,10,0.4) + y=a*x+b + plot(x,y, type="l") + title(paste("a=",a,"b=",b)) + } > > #test > LinePlot(a=-2,b=9)
HTH -- View this message in context: http://r.789695.n4.nabble.com/expression-and-plot-title-tp2348566p2350361.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.