Orion constellation project

Hello! Please have a look at my orion constellation project.

  1. Set-Up
    %matplotlib notebook
    from matplotlib import pyplot as plt
    from mpl_toolkits.mplot3d import Axes3D

  2. Create a 2D Visualization
    fig = plt.figure(figsize=(4,4))
    plt.subplot(1,1,1)
    plt.scatter(x,y)
    plt.title(“2D visualization of the Orion constellation”)
    plt.show()
    Capture

  3. Create a 3D Visualization
    fig_3d = plt.figure(figsize=(4,4))
    plt.subplot(1,1,1,projection=‘3d’)
    constellation3d = plt.scatter(x,y,z)
    plt.title(“3D visualization of the Orion constellation”)
    plt.show()

Since this is my post, I am not allowed to upload more than 1 image.
So I am uploading my 3D plot here.
Capture1

Looks good.
The only thing I would add would be axis labels like
ax.set_xlabel(“Projected Right Ascension”) # add x label
ax.set_ylabel(“Projected Declination”) # add y label

I also added x, y, and z labels to the axis for better read
I started with
constellation3d = fig_3d.add_subplot(1,1,1, projection=“3d”)

constellation3d.set_xlabel(“Projected Right Ascension”) # add x label
constellation3d.set_ylabel(“Projected Declination”) # add y label
constellation3d.set_zlabel(“Projected Distance”) # add y label

image

1 Like