import yt ds = yt.load("GasSloshing/sloshing_nomag2_hdf5_plt_cnt_0150") print ds.domain_left_edge print ds.domain_right_edge # default width figures out units properly yt.SlicePlot(ds, 'x', 'density') # use domain_*_edge (units of code_length) to specify width of Slice; plot has code_length instead of ds.length_unit w = (ds.domain_right_edge[1], ds.domain_right_edge[2]) yt.SlicePlot(ds, 'x', 'density', width=w) # use a combination of domain_right_edge and ds.quan really screws up w = (ds.domain_right_edge[1], ds.quan(1, 'Mpc')) yt.SlicePlot(ds, 'x', 'density', width=w)