aboutsummaryrefslogtreecommitdiffstats
path: root/mkplot_Stats.py
blob: 0759eb4b9bf1eaf92b30c5e314c76a5bed86203e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
"""
Plot Disk, Halo, Box Masses. Plot Mass Lost to Halo, and Star.
"""

import numpy as np
import matplotlib.pyplot as plt
from math import pi


# Load Data
npz = np.load('Stats.npz')

# Make Plots
plt.figure(1)
plt.plot(npz["tout"]/2./pi, npz["mass_disk"], 'bs-', label='Disk Mass')
plt.plot(npz["tout"]/2./pi, npz["mass_halo"], 'rs-', label='Halo Mass')
plt.plot(npz["tout"]/2./pi, npz["mass_box"], 'gs-', label='Box Mass')
plt.grid()
plt.yscale('log')
plt.xlabel('Time [yr]')
plt.ylabel('Mass [Msolar]')
plt.title('Disk, Halo, and Box Mass')
plt.legend()

plt.figure(2)
plt.plot(npz["tout"]/2./pi, npz["mass_lost_to_star"], 'bs-')
plt.grid()
# plt.yscale('log')
plt.xlabel('Time [yr]')
plt.ylabel('Mass [Msolar]')
plt.title('Mass Lost to Star')

plt.figure(3)
plt.plot(npz["tout"]/2./pi, npz["mass_lost_to_halo"], 'bs-')
plt.grid()
plt.yscale('log')
plt.xlabel('Time [yr]')
plt.ylabel('Mass [Msolar]')
plt.title('Mass Lost to Halo')

plt.show()