[yt-users] FLASH 2D color bar setting

Ryan Sacks rsacks at wisc.edu
Mon Oct 22 11:30:11 PDT 2012


Hello All,

I am currently using YT to plot the results from 2D cylindrical FLASH simulations. I am trying to figure out how to set the pseudocolor bar in the Slice plots I am making so that they are consistent through multiple graphs and not automatically set by the data that is loaded in. Any advice that someone could offer as to what commands I should use would be greatly appreciated. The script I am using is below:

from yt.mods import *
import matplotlib.pyplot as plt
import numpy as np

str_list = ["../life_hdf5_chk_0001",
 "../life_hdf5_chk_0002",
 "../life_hdf5_chk_0003",
 "../life_hdf5_chk_0004",
 "../life_hdf5_chk_0005", ]

for s in str_list:
 pf = load(s)
 p = SlicePlot(pf, 2,'tele',origin='left-domain')
 p.set_window((0.0, 250.0, 0.0, 250.0))
 p.save()

I have attempted to add the line:
p.set_zlim(zmin,zmax)
into the script above and below the p.set_window command but it returns the error "set_zlim() takes exactly 4 arguments (3 given)". I have tried adding in other arguments to nticks, ticks and minmaxticks but to no avail. Thanks in advance to any advice.
--
Cheers,
Ryan Sacks

--
Ryan F. Sacks
University of Wisconsin-Madison
Nuclear Engineering and Engineering Physics
rsacks at wisc.edu



More information about the yt-users mailing list