and save the figure into png file, there is way too much white space from left right top and bottom, so when I want to add this graph into latex and use it in publication, I have to do post-processing of the image and remove unnecessary amount of blank space.
I don’t know why there is so much white space around 3-D projections. Presumably to allow them some room to be rotated. However, you can mitigate the problem during display using plt.figure(constrained_layout=True), and/or during print with fig.savefig(bbox_inches='tight').