# How to plot 1/energy units in the energy (E) vs density of states (DOS) plot? [on hold]

I have calculated the eigenvalues of Hamiltonian by exact diagonalization. Now I want to plot density of states (DOS) on y-axis and E on x-axis. DOS counts the number of energy levels in unit interval $$DOS = dN/dE$$. If I plot histogram x-axis gives bis and y-axis gives counts. So how can I plot DOS using histogram?

E = np.array[(-2.21624382536, -1.7385345624, -1.05978531706, -0.742126286458,
-0.694103548853, -0.561063356108,-0.519502851983, -0.179336545855,
-0.0660011982944 0.521325710734, 0.549263158802, 0.627772313014,
0.716034277291, 1.23811345401 1.84733960261, 2.27684897591 )]


## put on hold as unclear what you're asking by Brian Borchers, boyfarrell, Mauro Vanzetto, nicoguaro♦yesterday

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• The first question would be, how is it usually plotted in your field? – Anton Menshov May 13 at 15:29
• I'will use histogram to plot this. But I have little confusion about this usually the DOS are plotted by Energy(on x-axis) and DOS(on y-axis). DOS has units of 1/Energy whereas DOS is calculated by counting the no of energy levels in unit interval. But if I plot histogram it gives me count(on y-axis) and bins(on x-axis). So how to get 1/Energy unit for DOS? – jerry May 13 at 15:35
• Regarding getting an answer, you need to help us help you. Add some information for us to decipher what is your goal. – nicoguaro May 13 at 16:00
• Did you check this question: scicomp.stackexchange.com/q/29307/9667 ? – nicoguaro May 13 at 16:05
• Yes I checked it but it uses two methods. I want to use histogram. or even if I use simple plot i'm not clear how can plot DOS from simple energy eigenvalues. – jerry May 13 at 16:10

3) Both matplotlib and numpy histogram implement the weight keyword.