Мне нужно, чтобы обе оси были показаны на графике посередине, чтобы при пересечении они делали крестообразную форму в середине (чтобы я мог геометрически представить ноль графа квадратичного). код, который я использовал, как я могу отредактировать его так, чтобы результат графика соответствовал моему ожидаемому результату
import math
import matplotlib.pyplot as plt
z = float(input("Enter the value of x "))
a = float(input("Enter the value of a "))
b = float(input("Enter the value of b "))
c = float(input("Enter the value of c "))
x = []
y = []
for i in range(-1000, 1000, 1):
x.append(i)
t = (a * (i ** 2)) + (b * i) + c
y.append(t)
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
ax.spines['left'].set_position('center')
ax.spines['bottom'].set_position('zero')
ax.spines['right'].set_color('none')
ax.spines['top'].set_color('none')
ax.xaxis.set_ticks_position('bottom')
ax.yaxis.set_ticks_position('left')
plt.plot(x, y)
plt.show()
Я ожидаю, что график будет таким

Но вместо этого это вид вывода
