![]() ".are in different cells, then it looks like the second returns, and no image appears".scatter on a 3d axes object created in another cell, it doesn't scatter anything on it." Jupyter senses an maptlotlib axes object being built and displays it. That explains why after your second code block, this statement by you "then without asking, an image appears and I can see a point on it." plt.show() in most cases is no longer needed and is superflous. I would like to be able to successively add things to an axes object, possibly in different cells.Īt conclusion of running a cell, modern Jupyter closes the plotting object and displays the plot object if it detects one being built in a cell and existing when the end of the cell is encountered. If I later call plt.savefig("test.png"), then an empty image (with no empty axis box drawn) is saved. Then without asking, an image appears and I can see a point on it.Īre in different cells, then it looks like the second returns, and no image appears, even if I later call plt.show(). scatter on a 3d axes object created in another cell, it doesn't scatter anything on it.Ĭoncretely, consider the following import statements, import numpy as npĪssuming the following block of code is in one cell of Jupyter Notebook, fig = plt.figure()Īx = fig.add_subplot(1, 1, 1, projection = "3d") ![]() ![]() In Jupyter Notebook, it appears that when I call.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |