I'm trying to plot a 2D FEM mesh in Python using Matlab code. I have my X,Y and color value arrays. Each of these arrays are in the shape of (Nodes per Element x Number of Total Elements). I tried to use pcolormesh but it doesn't produce the same result as patch function in Matlab.
What my plot looks like with the code axstress_xx.pcolormesh(X,Y,stress_xx,cmap='jet')
in Python:
What it actually should look like with the code patch(app.postProcessGraph,X,Y,stress_xx,'FaceColor','interp','LineStyle',app.enableLine)
in Matlab:
As you can see, the bottom left part of the plot doesn't seem to be right and also the plot seems not to have the right colors. I checked X,Y and color values both in Matlab and Python and they're totally the same. What am I missing here? Is pcolormesh different from patch function in terms of plotting mechanism?