I am trying to plot a contour plot of non rectangular data without any interpolation (I do not want to use the meshgrid module here). Therefore I tried following code:
x_co=data_U[:,0] #-> 22450 rows
y_co=data_U[:,1] #-> 22450 rows
U_co=data_U[:,3] #-> 22450 rows
u_im=np.zeros((len(u_co),len(u_co))) #24450,22450 array
u_im[zip(y_co,x_co)]=U_co #22450,22450 array
fig1.plt.figure()
plate=pltcontourf(x_co,y_co,u_im,vmin=-10, vmax=10,extent=[x_co[0],x_co[-1],y_co[0],y_co[-1]],origin='upper',levels=level,cmap=plt.cm.jet,aspect='auto')
plt.show
I do always run out of memory, so the idea is to decrease the resolution by np.meshgrid(xi,yi) with 1000,1000 points. Next step would be interpolating data U_co on the new meshgrid, but the triangulation here connects vertices where it should not. So my non regular grid is not realistic given by the interpolation.
Any advice?