import yt.mods filename = "sample.hdf5" pf = yt.mods.load(filename) pc = yt.mods.PlotCollection(pf, [0.0,0.0,0.0]) pc.add_slice("Density", "z", use_colorbar=True, periodic=False)
pc.set_width(width=5.00E+12, unit='cm') pc.set_xlim(-1.0E12, 1.0E12) pc.set_ylim(0.0, 1.0E12) pc.set_zlim(1.0E+00, 1.0E+30, nticks=5) pc.autoscale() pc.set_cmap(hot)
pc.plots[-1].modify["coord_axes"](unit="cm", coords=True) pc.plots[-1].modify["title"](title="plot") pc.plots[-1].modify["grids"](alpha=1.0, min_pix=1, annotate=False, periodic=False) pc.plots[-1].modify["text"](pos=[0.5,0.8], text="foo", data_coords=False) pc.plots[-1].modify["contour"]("bar", ncont=2, factor=1, take_log=False) pc.plots[-1].set_width(width=5.00E+12, unit='cm')
pc.save(format="eps")