Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
yt-project
GitHub Repository: yt-project/yt
Path: blob/main/doc/source/cookbook/annotate_timestamp_and_scale.py
928 views
1
import yt
2
3
ts = yt.load("enzo_tiny_cosmology/DD000?/DD000?")
4
for ds in ts:
5
p = yt.ProjectionPlot(ds, "z", ("gas", "density"))
6
p.annotate_timestamp(corner="upper_left", redshift=True, draw_inset_box=True)
7
p.annotate_scale(corner="upper_right")
8
p.save()
9
10