I am converting some simple octave / matlab programs to python, but when using the matplotlib function, the contourpreviously constructed 2D points seem to be aligned or smoothed at x = 1. Any ideas why this happens?

For an octave / matlab logistic regression exercise, I draw some data points
plotData(X(:,2:3), y);
and then display the border of the solution around different categories. This last part is done with contour:
contour(u, v, z, [0, 0], 'LineWidth', 2)
The result is the following:

In python, everything goes well to outline points:
p1 = plt.plot(X[pos,0], X[pos,1], marker='+', markersize=9, color='k')[0]
p2 = plt.plot(X[neg,0], X[neg,1], marker='o', markersize=7, color='y')[0]

but when immediately after use contour, as shown below, the first image is displayed:
p3 = plt.contour(u, v, z, levels=[0], linewidth=2)
, u v /matlab python, linspace(-1, 1.5, 50) ( ). , python z python /matlab z, , .
Google , python matlab contour. !
:
, , ( ).
p1 = plt.plot(X[pos,0], X[pos,1], marker='+', markersize=9, color='k')[0]
p2 = plt.plot(X[neg,0], X[neg,1], marker='o', markersize=7, color='y')[0]
, /matlab script:
pd.plotData(X[:,1:3],y)
plotData plt.plot(...). , , ( ) , x = 1. , , !
