I'm trying to plot cuboids of different sizes using matplotlib, such that: after rotation the cuboids do not overlap visually in a non-physical way, the cubes have different colors and a box drawn around them.
I've read several blog posts and stackoverflow pages referencing similar problems, but always with a slight difference; none which have worked for me. The easiest way to overcome the overlapping problem was to use voxels (as in https://matplotlib.org/api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D.html?highlight=voxel#mpl_toolkits.mplot3d.axes3d.Axes3D.voxels), but these do not allow me to draw boxes around them. What's the easiest way to do this in matplotlib?
The image below shows what I have on the left, and what I want on the right.
EDIT:
I've looked into several approaches that can give the desired effect, of which the main ones are:
<