Someone posted how to convert 2D Matplotlib images to a np.array. I'd like to do the same for a 3D Matplotlib plot. To be clear, I am not asking to save a 2D "screenshot" of fig.canvas
as an array, but rather a raster of the 3D lines as an array.
Why? My raw data is a list of node id's, their (x,y,z) coordinates, the node id's they are connected to, and the radius of those connections. I used mplot3d
to connect these dots with lines, and now I want to use these 3D structures for machine vision research. For that, the data needs to be in a numpy array. I want to avoid writing a function to connect the nodes when a tool already exists.