[yt-users] FLASH 2D color bar setting

Ji Suoqing jisuoqing at gmail.com
Mon Oct 22 12:07:02 PDT 2012


Hi Ryan,

> I have attempted to add the line:
> p.set_zlim(zmin,zmax)

Try this:

p.set_zlim('tele',zmin,zmax)

Best wishes,
Suoqing

On Oct 22, 2012, at 2:30 PM, Ryan Sacks <rsacks at wisc.edu> wrote:

> 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
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org




More information about the yt-users mailing list