I am trying to create contour plots in the polar region and made some quick scripts in Matlab to get some results. Out of curiosity, I also wanted to try the same thing in python using matplotlib, but somehow I see different sets of contour plots for the same input. I am trying to figure out what is happening, and if there is something that I could change in my Python code to get similar results in both cases.
A screenshot of the Matlab results is here: 
In matlab code, I used the scatteredinterpolant function to get the interpolated data, I assume the differences are due to the interpolation function used?
Input data -
Angles = [-180, -90, 0 , 90, 180, -135, -45,45, 135, 180,-90, 0, 90, 180 ] Radii = [0,0.33,0.33,0.33,0.33,0.5,0.5,0.5,0.5,0.5,0.6,0.6,0.6,0.6] Values = [30.42,24.75, 32.23, 34.26, 26.31, 20.58, 23.38, 34.15,27.21, 22.609, 16.013, 22.75, 27.062, 18.27]
This was done using python 2.7, on spyder. I tried both scipy.interpolate.griddata and matplotlib.mlab.griddata , and the results are similar. I was not able to get the nn method working in mlab.griddata because it continued to give me masked data.
I apologize if I am missing something meaningful - let me know if any information is needed. I will update my post.
Edit:
The griddata scipt line image looks like this: 
And the cubic scipy image looks 
As for the code, here is the code - I pass the string like interpolation to the function where this code is present. Thus, βlinearβ and βcubicβ are 2 inputs.
val = np.array(list(values[i])) radius = np.array(list(gamma[i])) ang = [math.radians(np.array(list(theta[i]))[x]) for x in xrange(0,len(theta[i]))] radiiGrid = np.linspace(min(radius),max(radius),100) anglesGrid = np.linspace(min(ang),max(ang),100) radiiGrid, anglesGrid = np.meshgrid(radiiGrid, anglesGrid) zgrid = griddata((ang,radius),val,(anglesGrid,radiiGrid), method=interpType)
The angle input is what comes out of np.array(list(theta[i]))[x] - this is because the angle information is stored in a list of tuples (this is because I am reading and sorting the data). I took a look at the code to make sure the data is correct and seems to line up. the gamma corresponds to the radii, and the values ββare the values ββin the sample data that I provided. Hope this helps!