#!/usr/bin/env python import mkipp import kipp_data import mesa_data import matplotlib.pyplot as plt from matplotlib.patches import PathPatch import numpy as np #simple example (saves to default filename Kippenhahn.png) mkipp.kipp_plot(mkipp.Kipp_Args()) #specify xrange and filename mkipp.kipp_plot(mkipp.Kipp_Args(save_filename = "Kippenhahn2.png"), xlims = [300,600]) #plot of Helium abundance against time, independent decoration fig = plt.figure() axis = plt.gca() #mkipp.kipp_plot returns an object containing # kipp_plot.contour_plot : the return value of matplotlibs contourf. Can be # used to create a colorbar with plt.colorbar() # kipp_plot.histories : list of history files read. data can be accesed from this # using the get("column_name") function # kipp_plot.xlims : limits of data in x coordinate kipp_plot = mkipp.kipp_plot(mkipp.Kipp_Args( xaxis = "star_age", time_units = "Myr", identifier = "y", log10_on_data = False, levels = np.arange(0.0,1.001,0.01), decorate_plot = False, save_file = False), axis = axis)
#!/usr/bin/env python import mkipp import kipp_data import mesa_data import matplotlib.pyplot as plt from matplotlib.patches import PathPatch import numpy as np #simple example (saves to default filename Kippenhahn.png) mkipp.kipp_plot(mkipp.Kipp_Args()) #specify xrange and filename mkipp.kipp_plot(mkipp.Kipp_Args(save_filename = "Kippenhahn2.png", xlims = [300,600])) #plot of Helium abundance against time, independent decoration fig = plt.figure() axis = plt.gca() #mkipp.kipp_plot returns an object containing # kipp_plot.contour_plot : the return value of matplotlibs contourf. Can be # used to create a colorbar with plt.colorbar() # kipp_plot.histories : list of history files read. data can be accesed from this # using the get("column_name") function # kipp_plot.xlims : limits of data in x coordinate kipp_plot = mkipp.kipp_plot(mkipp.Kipp_Args( xaxis = "star_age", time_units = "Myr", identifier = "y", log10_on_data = False, levels = np.arange(0.0,1.001,0.01), decorate_plot = False, save_file = False), axis = axis)
#!/usr/bin/env python import mkipp import kipp_data import mesa_data import matplotlib.pyplot as plt from matplotlib.patches import PathPatch import numpy as np #simple example (saves to default filename Kippenhahn.png) mkipp.kipp_plot(mkipp.Kipp_Args()) #plot of Helium abundance against time, independent decoration fig = plt.figure() axis = plt.gca() #mkipp.kipp_plot returns an object containing # kipp_plot.contour_plot : the return value of matplotlibs contourf. Can be # used to create a colorbar with plt.colorbar() # kipp_plot.histories : list of history files read. data can be accesed from this # using the get("column_name") function # kipp_plot.xlims : limits of data in x coordinate kipp_plot = mkipp.kipp_plot(mkipp.Kipp_Args( xaxis = "star_age", time_units = "Myr", identifier = "y", log10_on_data = False, levels = np.arange(0.0,1.001,0.01), decorate_plot = False, save_file = False), axis = axis) bar = plt.colorbar(kipp_plot.contour_plot,pad=0.05) bar.set_label("Helium abundance") axis.set_xlabel("Time (Myr)")
#!/usr/bin/env python import mkipp import kipp_data import mesa_data import matplotlib.pyplot as plt from matplotlib.patches import PathPatch import numpy as np #simple example (saves to default filename Kippenhahn.png) mkipp.kipp_plot(mkipp.Kipp_Args()) #plot of Helium abundance against time, independent decoration fig = plt.figure() axis = plt.gca() #mkipp.kipp_plot returns an object containing # kipp_plot.contour_plot : the return value of matplotlibs contourf. Can be # used to create a colorbar with plt.colorbar() # kipp_plot.histories : list of history files read. data can be accesed from this # using the get("column_name") function # kipp_plot.xlims : limits of data in x coordinate kipp_plot = mkipp.kipp_plot(mkipp.Kipp_Args(xaxis="star_age", time_units="Myr", identifier="y", log10_on_data=False, levels=np.arange(0.0, 1.001, 0.01), decorate_plot=False, save_file=False), axis=axis) bar = plt.colorbar(kipp_plot.contour_plot, pad=0.05) bar.set_label("Helium abundance") axis.set_xlabel("Time (Myr)")