-pl.plot([-1, 1], [w[0] / w[1], -w[0] / w[1]])
+# w is orthogonal to the hyperplan
+# with generateData
+# plot arguments format is pl.plot([x1,x2],[y1,y2])
+# w[0]x + w[1]y = 0, so y = -w[0]x / w[1]
+# pl.plot([-1, 1], [w[0] / w[1], -w[0] / w[1]])
+# with generateData2 and complete
+# w[0]x + w[1]y + w[2] = 0, so y = -(w[0]x + w[2]) / w[1]
+x_start1 = -0.5
+x_start2 = 2.5
+pl.plot([x_start1, x_start2], [-(w[0] * x_start1 + w[2]) /
+ w[1], -(w[0] * x_start2 + w[2]) / w[1]])