Export .stl or .obj from 3D plot

Hello everyone,
I am very new to python and programming in general. However, for an art project, I have spent the last week learning to program using python and found the plotly library. So amazing! It improved my code so much!
I have written a code which lets me load in .wav files, creating a 3D spectrogram and exporting the 3D image to either a .png or html file.
However, what I actually wanted to have is an .stl or .obj file of the 3D spectrogram (see image attached).
I have already tried a few things, eg. I found a page which turns .png in .stl. It is a good alternative but it’s not what I was looking for. I had another idea where I would make x .png slices of the 3D spectrogram and then build a .stl from the slices.

I was wondering, maybe someone of you has another idea or advice to export the 3D plot into a .stl/.obj file.

Thank you very much in advance for your help =)
Bests,
Sweetheart90

I’m also curious if anyone has found a way to do this. In my case, I have a plotly isosurface plot that I would love to export into a color CAD file format like .ply or .obj.

1 Like