scatter plot with histograms in 3d

Viewed 409

I want to plot histograms next to the axis of my 3d plot (something like the image but in 3d) enter image description here

x = np.random.randn(1000)
y = np.random.randn(1000)
z = np.random.randn(1000)
fig = plt.figure(figsize = (10,10))
ax = fig.add_subplot(111, projection='3d')
ax.scatter(x, y, z, s = 1, color='black')

Looking at the documentation (https://matplotlib.org/3.1.1/gallery/lines_bars_and_markers/scatter_hist.html#sphx-glr-gallery-lines-bars-and-markers-scatter-hist-py) I don't know how to extrapolate to 3d axes.

I have a 3d plot such as the one below and histograms for each axis that I want to plot next to it.

enter image description here

1 Answers

for such a plot in figure use seaborn.jointplot

you should use plotly and cufflinks to create 3d plots

Related