Pretty plotting of spectra? [Ask AstroBetter]

by Jane on January 27, 2012

What tools (or self-rolled code) do people prefer when making big publishable figures of spectra?  The example given was an echelle spectrum, where the spectrum is loooong, and has many spectral orders to stack onto one or more pages of the journal.

Since this is a shamelessly self-generated Ask AstroBetter, I will award a beer for the best answer (or source code.)

{ 5 comments… read them below or add one }

1 Adam Ginsburg January 27, 2012 at 9:28 am

My spectroscopic plotting/fitting kit. It uses matplotlib.

How is the echelle spectrum formatted? I’m trying to make the code read in a wide variety of spectral formats by default; I’m working on IRAF’s multispec format right now.


2 Erik T January 27, 2012 at 2:57 pm

Along the same lines, I like the one I made 🙂 – – it also uses matplotlib. I speculate that’s the answer a lot of people will give in python though (i.e. “the one I made”).


3 John January 28, 2012 at 3:16 pm

@Adam: The download link doesn’t work for me. It does work if I use the much longer name given for wget.


4 Adam Ginsburg January 28, 2012 at 5:54 pm

@John: Thanks, fixed. The correct link address is When I download that, it gets me an unfortunately named file; I’ll see if I can make it a little nicer looking.

5 Raymond April 16, 2015 at 1:12 pm

I see this is an old thread, but just wanted to offer a site I recently helped develop at, which includes basic spectral modeling of the HITRAN and NIST databases in an interactive web platform. You can save spectra to csv if you want more flexibility in a separate plotting program. Please let me know if you can think of any ways to make this better


Leave a Comment

Previous post:

Next post: