Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The problem is the way you are calling contour plot. Notice that f(x,y,1,0) is y/abs(y). When you are calling contour plot, you aren't specifying which range goes with which variable, so it assumes that the first numeric range (the horizontal axis) goes with the first variable in the expression, which is y.

The solution is to specify explicitly that the horizontal axis corresponds with the x variable, and the vertical axis is for the y variable:

plota1b0=contour_plot(f(x,y,1,0),(x,-10,10),(y,-10,10),cmap='jet',colorbar=true)

See a live example