So, this code is perfectly in terms of displaying a 3D graph -- it works without issues. That being said, the 3D graph doesn't rotate because, earlier in our code, we commented out our import statement of the matplotlib library:
If we un-comment this line (i.e. remove the # symbol from the beginning of the sentence) then we can actually move our graph around by clicking and dragging.
NOTE: This is just an FYI since the project was previously reviewed.
https://github.com/salleynealt/codecademy-dvp-2/blob/78904b736874756fecb28d7c2a05b9cb85ac236c/constellation.py#L106-L109
So, this code is perfectly in terms of displaying a 3D graph -- it works without issues. That being said, the 3D graph doesn't rotate because, earlier in our code, we commented out our import statement of the
matplotlib
library:#get_ipython().run_line_magic('matplotlib', 'notebook')
If we un-comment this line (i.e. remove the
#
symbol from the beginning of the sentence) then we can actually move our graph around by clicking and dragging.