.. _example_datasets_plot_sdss_spectrum: SDSS Spectrum Example --------------------- This example shows how to fetch and plot a spectrum from the SDSS database using the plate, MJD, and fiber numbers. The code below sends a query to the SDSS server for the given plate, fiber, and mjd, downloads the spectrum, and plots the result. .. image:: ../images/datasets/plot_sdss_spectrum_1.png :scale: 100 :align: center .. raw:: html
**Code output:** .. raw:: html
.. literalinclude:: plot_sdss_spectrum.txt .. raw:: html
**Python source code:** .. raw:: html
.. literalinclude:: plot_sdss_spectrum.py :lines: 9- .. raw:: html
:download:`[download source: plot_sdss_spectrum.py] ` .. raw:: html