I want to represent a binary 3D matrix in a 3D plot (if possible not with mayavi.mlab). At every location (x,y,z) where the matrix has a 1 a point should be plotted. My matrix is built the following way:
import numpy as np
size = 21
my_matrix = np.zeros(shape = (size, size, size))
random_location_1 = (1,1,2)
random_location_2 = (3,5,8)
my_matrix[random_location_1] = 1
my_matrix[random_location_2] = 1
Now at the coordinates (1,1,2) and (3,5,8) a dot should be visible, everywhere else just empty space. Is there any way to do this (e.g. with matplotlib?)