Coding an R cartesian plane

Viewed 3576

I'm learning R. So far I've been able to represent some functions, but I don't know how to make a cartesian plane. How do you make a cartesian plane in R?

Here's my code:

num<-400
a<-scan(n=1)
x<-c(n=num)
y<-c(n=num)
for (i in 1:num)
{
    x[i]=i
    y[i]=x[i]^2
}
plot(x,y,type="l",col="red")
title(main="Funzioni", col.main="blue", font.main=4)
1 Answers
Related