python - 3D pcolor/pclormesh plot in matplotlib -


1. attempt

  • 2-d numpy array represent value of area, showing this:

http://i8.tietuku.com/90d045a6c2375474.png

and want plot value in z-axis.

for example, if want plot altitude of area, using 3d pcolor plot, can figure real terrain.

2. result

for now, can plot 3-d plot of area using

code

import mpl_toolkits.mplot3d.axes3d axes3d fig,ax = plt.subplots(subplot_kw=dict(projection='3d'),figsize = (12,8)) ax.plot_surface(xx, yy,value,rstride = 1,cstride = 1,\             cmap=plt.cm.spectral_r,linewidth = 0) 

result

http://i4.tietuku.com/b2e650d0d23d5756.png

can 1 offer advice plot 3-d based on each grid value (like 3-d histogram)?

update

a little question added here, how change xticks , yticks in 3-d axes?

is http://matplotlib.org/examples/mplot3d/bars3d_demo.html looking for?


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -