Plot_me.py
Go to the documentation of this file.
1 # Author: M. Reichert
2 import numpy as np
3 import matplotlib.pyplot as plt
4 # Import the WinNet python plot-routine
5 # Note that you can also just append the path to your .bashrc
6 import sys
7 sys.path.append('../../bin')
8 from class_files.winnet_class import winnet
9 
10 
11 fig = plt.figure(figsize=(8,4))
12 ax = fig.gca()
13 
14 mrsn_example = winnet('.')
15 
16 # Load data from the finab
17 mrsn_example.read_finab()
18 # Plot the isotopes from the finab as a chain versus mass number
19 mrsn_example.plot_final_isotopes(figure=fig,lower_limit=1e-5)
20 ax.set_ylim(1e-5,1)
21 
22 
23 # Setup a second plot
24 fig2 = plt.figure(figsize=(8,4))
25 ax2 = fig2.gca()
26 # Load data from the timescales
27 mrsn_example.read_timescales()
28 mrsn_example.plot_timescales(figure=fig2)
29 
30 ax2.legend()
31 
32 ax2.set_xlim(3e-2,1e2)
33 ax2.set_ylim(1e-11,1e13)
34 
35 fig.savefig("final_mass_fractions_isotopes_weakr_obergaulinger.pdf",bbox_inches="tight")
36 fig2.savefig("timescales_weakr_obergaulinger.pdf",bbox_inches="tight")
37 
38 plt.show()