import matplotlib.pyplot as plt
import numpy as np
import math

# Graph Settings
X_LABEL = ""
Y_LABEL = ""
TITLE = ""
GRID = True

def function(x):
	# Return a value from x.
	
	return math.sqrt(1 - (x * x))

def top_left():
	x_data = [-i for i in np.linspace(0, 1, 100)]
	y_data = [function(x) for x in x_data]
	
	return (x_data, y_data)

def top_right():
	x_data = [i for i in np.linspace(0, 1, 100)]
	y_data = [function(x) for x in x_data]
	
	return (x_data, y_data)

def bottom_left():
	x_data = [-i for i in np.linspace(0, 1, 100)]
	y_data = [-function(x) for x in x_data]
	
	return (x_data, y_data)

def bottom_right():
	x_data = [i for i in np.linspace(0, 1, 100)]
	y_data = [-function(x) for x in x_data]
	
	return (x_data, y_data)

def create_data():
	x = []
	y = []
	for x_data, y_data in [top_left(), top_right(), bottom_left(), bottom_right()]:
		x += x_data
		y += y_data
	
	return (x, y)

x, y = create_data()
plt.plot(x, y)

plt.xlabel(X_LABEL)
plt.ylabel(Y_LABEL)
plt.title(TITLE)
plt.xticks(np.linspace(-1, 1, 21))
plt.yticks(np.linspace(-1, 1, 21))
plt.grid(GRID)
plt.show()
