General advice on plotting
Try not to be reliant on having python automatically choose the
axis ranges.
When making plots, I usually first plot the data using autoscale,
but after that I set the ranges myself. That way you can also set it
up so that if you are plotting magnitudes, bright things are at the
top. So for example, do a plt.ylim(15,0)
would set the y-axis so that the numbers start at 15 at the bottom
and drop to 0 at the top, and then that would have brighter
magnitudes at the top.
Always label your axes (including units!) and use math format
when needed.
If you enclose your labels in dollar signs, you can have prettier
axis that use math format. Try doing a plt.xlabel('$M_{V,gal}$
[mags]') for example.
Change point sizes depending on your dataset.
If you are plotting a handful of points, the matplotlib default is
fine, but if you are plotting lots and lots of data, use smaller
point sizes. You can control point size this way:
plt.scatter(x,y,s=100) # bigger point sizes
plt.scatter(x,y,s=1) # very small point sizes