Visualize colors in voxel data

Viewed 24

In my data

import numpy as np
import matplotlib.pyplot as plt


voxel = np.random((2,2,2))
fig = plt.figure()
ax = fig.gca(projection = '3d')
ax.voxels(voxel, edgecolor ='k')

In this code, I can get the voxels with same color although all of the voxel has different values because of random function.

Here, can I make these voxel colors different according to the data in 'voxel'?

+) Also, I want to add colorbars in my plotting to see the range of colors like imshow() functions to get the feature map of CNN, however the system sends me that ax.voxels doesn't support colorbars. Can you give me suggestion how to plot my data?

0 Answers
Related