Plotting class for 1D (MESA) psygrids.
The 2D visualization plotting class allows to plot 1D tracks of PsyGrid objects. The PsyGrid object is composed of nD MESA grid run with POSYDON and post processed with the psygrid object into an h5 file.
- class posydon.visualization.plot1D.plot1D(run, x_var_str, y_var_str, z_var_str=None, history='binary_history', star_states=None, HR=False, verbose=False, **kwargs)[source]
Bases:
object
Plotting class for 1D (MESA) grids.
Read a PsyGrid object and plot a 1D track of x vs y.
- Parameters
run (int or list of int) – Index or list of indeces of the PsyGrid object you would like to plot.
x_var_str (str) – String of values to plot on the x axis. Allowed strings are the one in psygrid.history.dtype.names where “history” needs to be chosen accordingly.
y_var_str (str or list of str) – String or list of stringvalues to plot on the y axis. Allowed strings are the one in psygrid.history.dtype.names where “history” needs to be chosen accordingly.
z_var_str (str) – String of values to plot on the z axis (displayed with a color). Allowed strings are the one in psygrid.history.dtype.names where “history” needs to be chosen accordingly.
history (str) – The x, y, z variables are read from either: “binary_history”, “history1”, “history2”.
HR (bool) – If True, an HR diagram will be plotted.
verbose (bool) – If True, the object reports by printing to standard output.
**kwargs (dict) – Dictionary containing extra visualisation options (cf. PLOT_PROPERTIES in plot_defaults.py.
- set_color_bar(scatter)[source]
Add colorbar.
- Parameters
scatters (object) – matplotlib scatter object.