[AstroPy] how to mark spectral lines in matplotlib?

Joe Philip Ninan indiajoe at gmail.com
Sat Dec 14 11:46:38 EST 2013


Hi,
There might be better options,
but you can always use annotate function in matplotlib inside a for loop to
add all the spectral line labels.
Following is an example to show the syntax.
plt.annotate(r'H$\alpha$', xy=(6563, 1.2), xytext=(6600, 1.7),
arrowprops=dict(arrowstyle="->",facecolor='black') )
-cheers
joe


On 14 December 2013 21:44, gonghang.naoc <ghang.naoc at gmail.com> wrote:

> Hi astropyers,
> I have a ready made spectral line atlas. Is there a direct way to mark the
> spectral lines in one spectrum plot?
> I have found  a module called lineid_plot. However,I can not install it.
>
> The images below are three examples.
>  http://www.cv.nrao.edu/course/astr534/images/bandscan.gif
>
> http://skyserver.sdss3.org/dr8/en/tools/quicklook/quickobj.asp?id=1237662661600608302
>  http://inspirehep.net/record/878108/files/plot_mean_spec1.png
>
> Thank you.
>
> hang
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy
>
>


-- 
/---------------------------------------------------------------
"GNU/Linux: because a PC is a terrible thing to waste" -  GNU Generation

************************************************
Joe Philip Ninan    http://sites.google.com/site/jpninan/
Research Scholar        /________________\
DAA,                            | Vadakeparambil |
TIFR,                           | Pullad P.O.         |
Mumbai-05, India.      | Kerala, India      |
Ph: +917738438212   | PIN:689548       |
------------------------------\_______________/--------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20131214/22ed8481/attachment.html>


More information about the AstroPy mailing list