Skip to content
Snippets Groups Projects
Commit 850d95b4 authored by Armin Damon Riess's avatar Armin Damon Riess
Browse files

made Hernquist density better visible in plot

parent 5a3be0df
No related branches found
No related tags found
No related merge requests found
plots/densityprofile.png

69.1 KiB | W: | H:

plots/densityprofile.png

74.5 KiB | W: | H:

plots/densityprofile.png
plots/densityprofile.png
plots/densityprofile.png
plots/densityprofile.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -45,10 +45,10 @@ print("Bin size:",dr) ...@@ -45,10 +45,10 @@ print("Bin size:",dr)
# plot poissonian error bars # plot poissonian error bars
plt.errorbar(bins[1:], rhoHernquist, yerr=np.sqrt(rhoHernquist), color='grey', fmt='.', label='Hernquist with Poisson error', markersize=0) plt.errorbar(bins[1:], rhoHernquist, yerr=np.sqrt(rhoHernquist), color='grey', fmt='.', label='Hernquist with Poisson error', markersize=0)
# plot Hernquist profile
plt.loglog(bins[1:]-dr/2, rhoHernquist, 'r-', label='Hernquist Density Profile', linewidth=1)
# plot density profile of data # plot density profile of data
plt.loglog(bins[1:]-dr/2, hist, 'b-', label='Density Profile from data', linewidth=1) plt.loglog(bins[1:]-dr/2, hist, 'b-', label='Density Profile from data', linewidth=1)
# plot Hernquist profile
plt.loglog(bins[1:]-dr/2, rhoHernquist, 'r-', label='Hernquist Density Profile', linewidth=1)
plt.xlabel(r'Radius $r$') plt.xlabel(r'Radius $r$')
plt.ylabel(r'Density $\rho(r)$') plt.ylabel(r'Density $\rho(r)$')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment