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)
It seems like you're trying to plot the numbers 1 through 400 against their squares. You could do this with:
Including some (empty) space for other three quadrants and some axes: