I like this and it is helping me for 2D plots. Is there a way to make this work for 3D plots for example for this plot below?
x = [0, 1, 2, 3, 4, 5]
y = [0, 1, 2, 3, 4, 5]
z = [0, 1, 2, 3, 4, 5]
fig = plt.figure()
ax = plt.axes(projection=“3d”)
ax.scatter(x, y, z, c=‘g’, s=20)
ax.plot(x, y, z)
ax.set_xlabel(‘X Label’), ax.set_ylabel(‘Y Label’), ax.set_zlabel(‘Z Label’)
plt.show()
@willhuang, are you serious? OMG, that’s going to kill what I am trying to do. I wanted to have rotatable and zoomable simple 3D plot with some simple boxes in it. Is it not doable in streamlit now? STREAMLIT DEVELOPERS, if you hear me, is that not possible?
For 3D visualizations I’d recommend using pyvista (and stpyvista for rendering that in streamlit), or even plotly for simpler plots. Matplotlib is great for anything in 2D, but it is not really designed for 3D or interactivity.
@edsaac, thanks for your recommendation. pyvista doesn’t seem to have zoom/rotate readily available. stpyvista on the other hand has that, which is what I needed.