I have 4D data (3D scatter points + color) built using the matplotlib mplot3d library. To help understand how a point cloud is distributed in space, I would like to show the projection of the cloud on each of the three planes (XY, XZ, YZ) using a 2D histogram / contour plot.
Here is the MWE that uses ax.plot to accomplish what I want (from the link below). This technically works, but I think replacing the bike-shot from ax.plot contour plots would be more enjoyable:
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D
What produces:




and etc.
So, to make it clear, is there a way to plot the XY, XZ, YZ 2D imshow using imshow above on connected 3D axes? A contour based solution would also be great.
Please note that (I'm pretty sure) this is not a repetition of this related question , the solution of which works only for 2D data (f (x, y)), not 3D (f (x, y, z)).
source share