Holoviews Contour and Matplotlib contourf y axis sign change / reflection anomaly

The linked Jupyter notebook and attached image shows that in order to get the consistency between holoviews Contour and Matplotlib contourf I had to reverse the sign of y (a reflection in the y-axis) for Holoviews.

Is this a bug, nuisance of hv.Image or some aspect of my code I have not fully understood? Any insights would be most welcome.

I do not use contourf of matplotlib usually, but in plt.imshow it happens the yaxis is reversed. The 0 value is conterintuitive and it is positioned in the top. It takes a time to get used to that.

Thanks, I had not appreciated this.

However, I can see it is easily verified using the Holoviews code:

pts = hv.Points(
xyz, kdims=[“x”, “y”], vdims=“z”
)
pts.opts(
line_color=“turquoise”,
line_width=3,
color=“z”,
size=8 * (1 + dim(“z”)),
cmap=“RdYlGn”,
).redim.range(z=(min(z), max(z)))

and Matplotlib code where the sign has to be flipped again:

plt.ylabel(“Y”, size=15)
plt.xlabel(“X”, size=15)
plt.scatter(x,-y,(z+1)*30, cmap=“RdYlGn”,c=z)