Is there a way to plot spectra in python such that it has square levels (histogram 'like'; therefore the spectral resolution is taken into account), rather than a continuous line which simply connects the points?
Asked
Active
Viewed 94 times
0
-
Python is very powerful and can do almost anything, can you be more specific? – m0nhawk May 16 '15 at 15:29
-
2Take a look at [ask] then edit your question to include whatever code you have tried. SO isn't a code writing service - if you want to buy code there are plenty of providers out there. – Mark Fitzgerald May 16 '15 at 15:32
1 Answers
0
In matplotlib, which is the most commonly used package for plotting spectra, you can use the drawstyle='steps-mid'
option. See http://matplotlib.org/api/axes_api.html?highlight=plot#matplotlib.axes.Axes.plot for details.
This question is asked and answered in detail here: http://www.astrobetter.com/blog/2012/01/27/pretty-plotting-of-spectra-ask-astrobetter/

keflavich
- 18,278
- 20
- 86
- 118