Orion constellation project

This is my variation of the Orion constellation project.
I also added some stars from Ursa Majoris constellation

#importing libraries %matplotlib notebook from matplotlib import pyplot as plt from mpl_toolkits.mplot3d import Axes3D # Orion x = [-0.41, 0.57, 0.07, 0.00, -0.29, -0.32,-0.50,-0.23, -0.23] y = [4.12, 7.71, 2.36, 9.10, 13.35, 8.13, 7.19, 13.25,13.43] z = [2.06, 0.84, 1.56, 2.07, 2.36, 1.72, 0.66, 1.25,1.38] #2d visualization fig = plt.figure().add_subplot(1,1,1).scatter(x,y) plt.title("Orion Constellation") plt.show() #3d visualisation fig_3d = plt.figure().add_subplot(1,1,1,projection="3d") constellation3d = fig_3d.scatter(x,y,z) plt.title("Orion Constellation") plt.show() #Ursa Majoris x1 = [-56.8,-42.6,-44.2, -41.9,] y1 = [14.2, 11.0, -2.98, -16.1,] ![orion_const_2d|640x480](upload://yNgcmdPxsVD4BKGxpFArvRuZuNL.jpeg) ![orion_const_3d|640x480](upload://7nWfXBqYsyQPxeZatYQu2buOWvD.jpeg) ![ursa_majoris|640x480](upload://1vojIz6BCANSgF1hBHx1WE4HMvC.jpeg) z1 = [109, 66.1, 68.3, 64.0,] fig_23d = plt.figure().add_subplot(1,1,1,projection="3d") polar3d= fig_23d.scatter(x1,y1,z1) plt.title("Ursa Majoris (partially)") plt.show()

I’m not sure maybe it’s because it’s running on an online IDE or I did something wrong, but the code is running an error if i try to run it.

Louis

Unfortunately, you cannot import Python libraries into Codebyte.

You can post a link to the project from your GitHub repo though…

Oh, I didn’t know that. I’ll link this project later. Thanks for advice!