#!/usr/bin/python3
import matplotlib
matplotlib.use('Agg') #Non interactive backend
import matplotlib.pyplot as plt
import numpy as np #bibliothhkh pou fortwnei pinakes

def main():
	x=np.linspace(0,10,100)
	print(x.shape)
	y=x**2
	plt.plot(x,y,'r-',linewidth=2)
	plt.xlabel('x')
	plt.ylabel('y=x^2')
	plt.title('Quadratic function')
	plt.grid(True)
	#plt.show() #nonono, den mporoume na to emfanisoume mesw pleiadwn opote to apothikeuoume
	plt.savefig("graf1.png", dpi=300,transparent=True)
	#tropos ektypwshs me morfh pinaka
	#for i in range(x.shape[0]):
	#	print(x[i])
	#tropos ektypwshs me morfh listas
	#for el in x:
	#	print(el)

if __name__=="__main__":
	main()
