.. _book_fig_chapter1_fig_SDSS_specgals: SDSS Spectroscopic Galaxy Sample -------------------------------- Figure 1.3. The r vs. u-r color-magnitude diagram for the first 10,000 entries in the catalog of spectroscopically observed galaxies from the Sloan Digital Sky Survey (SDSS). Note two "clouds" of points with different morphologies separated by u-r ~ 2.3. The abrupt decrease of the point density for r > 17.7 (the bottom of the diagram) is due to the selection function for the spectroscopic galaxy sample from SDSS. This example shows how to fetch photometric data from the SDSS spectroscopic sample and plot a simple color-magnitude diagram. .. image:: ../images/chapter1/fig_SDSS_specgals_1.png :scale: 100 :align: center .. raw:: html
**Code output:** .. raw:: html
.. literalinclude:: fig_SDSS_specgals.txt .. raw:: html
**Python source code:** .. raw:: html
.. literalinclude:: fig_SDSS_specgals.py :lines: 15- .. raw:: html
:download:`[download source: fig_SDSS_specgals.py] ` .. raw:: html