Graphic of 2π periodic function

Can someone tell me please how do I plot 2D graphic of 2\pi periodic function y = x^2-\pi^2 with range of x = -\pi to x = \pi ? Thank you

x = linspace(-%pi,%pi,64);
y = x.^2-%pi.^2;
plot(x,y);

And this Plot 2D Graphic Beginner Question

Hello, if you want to plot this periodic function outside the principal range of x, you have to use pmodulo to compute the principal determination of each x, like this:

x = linspace(-10,10,1000);
xp = pmodulo(x+%pi,2*%pi)-%pi;
plot(x,xp.^2-%pi^2)