Yes, you're right, you're not doing y^2
. To plot elliptic curve in matplotlib I used this code (tested in Python 3):
import numpy as np
import matplotlib.pyplot as plt
def main():
a = -1
b = 1
y, x = np.ogrid[-5:5:100j, -5:5:100j]
plt.contour(x.ravel(), y.ravel(), pow(y, 2) - pow(x, 3) - x * a - b, [0])
plt.grid()
plt.show()
if __name__ == '__main__':
main()
I've got this plot:
Is this what you need?