Plot sine curve in R -
how can plot generic sin curve in r? based on answer of this post, tried:
x <- seq(0,pi,length.out=100) y <- sin(x) plot(x,y,type="l")
actually graph, produced gnuplot
:
plot sin(x) linestyle 1
furthermore, know why gnuplot
produces graph if not assign value variable x
. have preassigned value or else?
pi
1 half of sine curve... add more pi
more curves...
x <- seq(0,8*pi,length.out=100) y <- sin(x) plot(x,y,type="l")
Comments
Post a Comment