Python program to plot the function y = x^2 using the pyplot or matplotlib libraries.

Karthika A
Guvi
Published in
1 min readDec 20, 2019

Below code will graph simple parabola y = x^2. The range of function would be (-50, 50) to get a parabolic form.

The plot method plots the x, y-axis value and displays the following parabola,

Parabolic form for y=x² range of(-50,50)

The axis values are(1,1),(2,4),(3,9),(4,16),(5,25),(6,36),.. so on till (50,2500) which yeilds a parabola.

--

--