python pandas 3D voxel plot

Viewed 34

I'm trying to use matplotlib to generate a 3D voxel plot of my spatial data to visualise where players go in my game.

This is the cube dataframe that I'm generating using the bounds of the game and placing a cube at regular intervals along each dimesion, with xyz describing the centre of each voxel and the offsets describing the bounds of each voxel. The value refers to the number of times a player entered that voxel so I can generate the heat map.

enter image description here

I'm currently using a scatter graph and that is working very well, but I want to be able to convert what I currently have into a voxel graph.

fig = matplotlib.pyplot.figure(figsize=(12, 12))
ax = fig.add_subplot(projection='3d')
print("Plotting")

ax.scatter(cubeDF['x'], cubeDF['y'], cubeDF['z'], c=cubeDF['value'], )
fig.show()

I'm sorry if this question is rushed but it's for my final year project and it's due in soon so I'm very stressed out about this whole thing

0 Answers
Related