I am following this post Parameters required by bar3d with python to understand the parameters of bar3d. The graph tallies with the data, but the plotting is not exact. I was expecting 0,0 to be exactly on 0,0. Also, dx = 0.1 and dy = 0.1 should have shown a square like impression, but is not.
Below is the data
- { x: -3.6, y: -0.019, occurence: 676 }
- { x: -3.10, y: -0.0999, occurence: 676 }
- { x: -1.9, y: -0.0999, occurence: 676 }
- { x: -0.07, y: 0., occurence: 676 }
- { x: 0., y: 0., occurence: 25564 }
- { x: 5.941, y: 0.0199, occurence: 24644 }
- { x: 5.942, y: 0.0199, occurence: 49288 }
- { x: 5.96, y: 0.0199, occurence: 24723 }
The corresponding code is
dx = np.empty(np.size(x))
dx.fill(0.1)
dy = np.empty(np.size(x)
dy.fill(0.1)
z = np.zeros(np.size(x_gt))
ax1.bar3d(x, y, z, dx, dy, occurence, "red" ) # z is dummy. occurence is height