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") 

enter image description here

actually graph, produced gnuplot:

plot sin(x) linestyle 1 

enter image description here

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

Popular posts from this blog

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -