salleynealt / codecademy-dvp-2

Data Visualization with Python
0 stars 0 forks source link

Summary #1

Open patrick-project-review opened 6 years ago

patrick-project-review commented 6 years ago

Overall, good job! I did notice two slight differences between what you have and what the solution code has:

https://github.com/salleynealt/codecademy-dvp-2/blob/5843aeeb27ceeccd28a1268154e6770070ea07f1/constellation.py#L72-L75

add_subplot returns an axes object which you would then call scatter on as it will have the correct scale that you set using the add_subplot call. If you use plt.scatter, that call might have no effect on the figure you just generated due to how Matplotlib handles plot generation. So, your code for the 2D figure might look something like this:

fig_2d = plt.figure()
constellation2d = fig_2d.add_subplot(1,1,1)
constellation2d.scatter(x,y)
plt.show()