python,matplotlib,plot,mplot3d

There are two issues with your code. 1: zpos should not be =data; this is the main hangup you are having. 2: You should (probably) be calling bar3d as ax1.bar3d(xposM.ravel(), yposM.ravel(), zpos, dx, dy, dz). As it stands, you are positioning your bars to have their base at where they...

python,matplotlib,plot,triangulation,mplot3d

I'm not an expert, but this was an interesting problem. After doing some poking around, I think I got something close. I made the Triangulation object manually and then passed it and a z list of zeros into plot_trisurf, and it put the triangles in the right place on z=0....

python,matplotlib,mplot3d,colormap

xpos = np.arange(0,4,1) ypos = np.arange(0,4,1) xpos, ypos = np.meshgrid(xpos, ypos) xpos = xpos.flatten() ypos = ypos.flatten() zpos = np.zeros(4*4) rho = np.random.random((4,4)) dx = 0.5 * np.ones_like(zpos) dy = dx.copy() dz = rho.flatten() nrm=mpl.colors.Normalize(-1,1) colors=cm.RdBu(nrm(-dz)) alpha = np.linspace(0.2, 0.95, len(xpos), endpoint=True) fig = plt.figure() ax = fig.gca(projection='3d') for i...

python,matplotlib,mplot3d,contourf

I agree with Ajean. I believe the problem arises because each matplotlib's artist (i.e. PolygonCollection) is rendered separately. There is no way different faces from the same object to be rendered on different sides of another object in the scene. Here is a useful piece of code : from mpl_toolkits.mplot3d...

python,matplotlib,plot,mplot3d

I tried to run your code, but it is not working in my computer. Below you can see a solution for plotting a sphere. Basically, I turned the color of the panes and spines to alpha=0 by hand and make the ticks to be empty lists (as you pointed out)....

python,matplotlib,scatter,mplot3d

You can set the edgecolor and facecolor separately, like this: import numpy as np from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt def randrange(n, vmin, vmax): return (vmax-vmin)*np.random.rand(n) + vmin fig = plt.figure() ax = fig.add_subplot(111, projection='3d') n = 100 for c, m, zl, zh in [('r', 'o', -50, -25),...

Your meshgrid is wrong: it contains many duplicated x and y values. Try this instead: In [7]: X,Y = meshgrid(unique(x), unique(y)) In [8]: X Out[8]: array([[ 0, 400, 800], [ 0, 400, 800], [ 0, 400, 800]]) In [9]: Y Out[9]: array([[ 0, 0, 0], [400, 400, 400], [800, 800,...