[AstroPy] equivalent routine to IDL Astronomy Library lineid_plot

Jonathan Slavin jslavin at cfa.harvard.edu
Wed Aug 24 10:34:03 EDT 2011


I wouldn't expect matplotlib to include such a routine either, but I
thought that maybe some astronomer might have had enough motivation to
adapt the routine.  I'm attaching a figure that I made with the IDL

The tricky parts as far as I can tell are making sure there is enough
space above the figure (providing that one wants the line labels to be
above the figure as the IDL routine makes them) and the creation of
those multi-segment lines when the labels are too close together.  There
are facilities within matplotlib with the annotate command to make such
lines, though how to apply it to this specific use is not clear to me.


On Wed, 2011-08-24 at 08:42 +0200, Johann Cohen-Tanugi wrote:
> Hi Jon, this is an ultra specialized IDL script. While I am sure it 
> could be part of an astro dedicated extension to matplotlib, I would not 
> be surprised that matplotlib does not deliver anything like that. Of 
> course this is the right place to ask, as maybe someone has already 
> implemented it for her/his own use. Could you provide a specific figure 
> as an example of what you would like to achieve?
> best,
> On 08/22/2011 06:18 PM, Jonathan Slavin wrote:
> > Hi all,
> >
> > Does any know if there exists a python/matplotlib equivalent for the IDL
> > Astronomy Library routine named lineid_plot?  What it does is plot a
> > spectrum with line list identifications annotated on it at the top of
> > the plot. I searched and couldn't find anything like it.  It does nice
> > things like making multiple line segments to separate the line ids for
> > cases where the lines are too close together.
> >
> > Jon
Jonathan D. Slavin              Harvard-Smithsonian CfA
jslavin at cfa.harvard.edu         60 Garden Street, MS 83
phone: (617) 496-7981           Cambridge, MA 02138-1516
 cell: (781) 363-0035           USA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flux_lines.eps
Type: image/x-eps
Size: 42230 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/astropy/attachments/20110824/7d60870c/attachment.bin>

More information about the AstroPy mailing list