ProfilePlot.
from_profiles
(profiles, labels=None, plot_specs=None, y_log=None)[source]¶Instantiate a ProfilePlot object from a list of profiles
created with create_profile()
.
Parameters: | profiles : a profile or list of profiles
labels : list of strings
plot_specs : list of dicts
|
---|
Examples
>>> from yt import simulation
>>> es = simulation("AMRCosmology.enzo", "Enzo")
>>> es.get_time_series()
>>> profiles = []
>>> labels = []
>>> plot_specs = []
>>> for ds in es[-4:]:
... ad = ds.all_data()
... profiles.append(create_profile(ad, ["Density"],
... fields=["Temperature",
... "x-velocity"]))
... labels.append(ds.current_redshift)
... plot_specs.append(dict(linestyle="--", alpha=0.7))
>>>
>>> plot = ProfilePlot.from_profiles(profiles, labels=labels,
... plot_specs=plot_specs)
>>> plot.save()