File: annotate_timestamp_and_scale.py

package info (click to toggle)
yt 4.1.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 76,192 kB
  • sloc: python: 125,909; ansic: 6,303; cpp: 3,590; sh: 556; javascript: 352; makefile: 131; csh: 36
file content (8 lines) | stat: -rw-r--r-- 268 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
import yt

ts = yt.load("enzo_tiny_cosmology/DD000?/DD000?")
for ds in ts:
    p = yt.ProjectionPlot(ds, "z", ("gas", "density"))
    p.annotate_timestamp(corner="upper_left", redshift=True, draw_inset_box=True)
    p.annotate_scale(corner="upper_right")
    p.save()