I am attempting to plot all permutations of the numbers 0-9 on a 3D plot. So far I have managed to learn enough to do the basics, but am having a hard time grasping the concept of plotting the permutations for all the X, Y, Z values 0-9. I do understand combinations are different from permutations but was not sure if combinations would be better suited for what I am attempting.
I have so far progressed to achieved the solution below. But being unfamiliar with matplotlib and Python in general. I am still under the impression itertools might be used to make the permutations of 0-9. But I have no idea how to implement it in a scenario as such this.
I would like to make these permutations on the X, Y, Z to be able then to call a function to grab all values on the X, Y, Z plane as specified as a parameter of just 3 values, representing the permutation numbers on intersecting plane by these 3 coordinates. If you were to draw a line from the X, Y, Z position to get the permutation values as a reference.
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.gca(projection='3d')
i = 0
# Plotting (X, Y, Z) for range 0-9, but all permutations of (X, Y, Z) 0-9
for x, y, z in zip(range(0, 10), range(0, 10), range(0, 10)):
i += 1 # Need to show number on plot
# Plot point, but also display number
ax.text(x, y, z, i, color="red")
# Set x limiter
ax.set_xlim(0, 10)
# Set y limiter
ax.set_ylim(0, 10)
# Set z limiter
ax.set_zlim(0, 10)
# Set labels
ax.set_xlabel('X axis')
ax.set_ylabel('Y axis')
ax.set_zlabel('Z axis')
# Show plots
plt.show()