pynbody.plot.stars.sfh#
- pynbody.plot.stars.sfh(sim, filename=None, massform=True, clear=False, legend=False, subplot=False, trange=False, bins=100, **kwargs)[source]#
star formation history
Optional keyword arguments:
- trange: list, array, or tuple
size(t_range) must be 2. Specifies the time range.
- bins: int
number of bins to use for the SFH
- massform: bool
decides whether to use original star mass (massform) or final star mass
- subplot: subplot object
where to plot SFH
- legend: boolean
whether to draw a legend or not
- clear: boolean
if False (default), plot on the current axes. Otherwise, clear the figure first.
By default, sfh will use the formation mass of the star. In tipsy, this will be taken from the starlog file. Set massform=False if you want the final (observed) star formation history
Usage:
>>> import pynbody.plot as pp >>> pp.sfh(s,linestyle='dashed',color='k')