Hi Luigi,
Glad to hear it worked out. As to your other point -- the choice to
make it display white was a conscious one on my part, but I now agree
with you that it was a mistake. If I don't hear from anyone else in
the next day or two, I will go ahead and change the default behavior
for the phase plots to lock to the bounds of the colorbar, rather than
the current method of "falling off the edge."
-Matt
On Wed, Jan 21, 2009 at 6:41 AM,
Hi Matt,
thanks for the fix, it works as expected! I would add a small suggestion: now the user can set the color scale between zmin and zmax, and the color is set to white (or background) for z > zmax or z < zmin. For visualisation purposes, maybe it would be more appropriate to set the color to "color(zmax)" (upper boundary of the color scale) for z > zmax, whereas the white background for z < zmin is certainly more readable. But this is probably a matter of taste... the tool is OK also as it is now, provided the extremes are wisely chosen by the user. Cheers,
Luigi
Quoting Matthew Turk
: Hi Luigi,
You're actually doing everything correctly -- there was just a bug! It had been fixed in trunk, but not in the yt-1.0 branch, so I went ahead and backported it. If you execute "svn up" in your src/yt directory, it should work now. (Depending on which version of the installation script you have, rerunning it should also work. You may also have to execute "python2.5 setup.py develop" in the yt directory.)
Let me know if there are any more problems -- but I was able to replicate your problem, and the committed change in r1130 has fixed it for me. Good luck!
-Matt
On Tue, Jan 20, 2009 at 3:29 AM,
wrote: Dear all,
I am currently trying to plot a 2D phase diagram (T vs rho). The plot is OK, but I have problems with setting the limits of the colorbar (where CellMassMsun is color-coded). Somehow, they are set automatically, which is bad, because I need to compare several plots of different datasets. The set_zlim command does not apparently affect the plot. I copy here my script, and I hope for some suggestions of yours. Thanks in advance,
Luigi
----------
#!/lrz/sys/graphics/yt/1.0/bin/python2.5
# importing modules from yt.mods import * import numpy as na
out_dir="/home/hlrb2/h0973/h0973aa/test-runs/test-yt/" # path for the output of this script
data_dir="/ptmp2/h0973/h0973aa/lss-sgs/64cubed/sgs0/files/outdir/" # path for ENZO data
#xmin=3e-33 #xmax=3e-26 ymin=5e1 ymax=3e8 zmin=1e4 zmax=1e14
##############################################################################
times = [] # in code units red = []
# the main cycle over the outputs (if more than one)
pf = lagos.EnzoStaticOutput(data_dir+"RedshiftOutput0014")
red = pf["CosmologyCurrentRedshift"]
print " \n " print "Analyzing data:" print "Redshift= "+str(red) print " \n "
pc = raven.PlotCollection(pf, center=[0.5,0.5,0.5])
pc.set_zlim(zmin,zmax) pc.add_phase_sphere(1.0,"1", ["Density", "Temperature", "CellMassMsun"], weight=None, x_bins=128,y_bins=128,#x_bounds=[xmin,xmax], y_bounds=[ymin,ymax],lazy_reader=True) #pc.set_zlim(zmin, zmax) pc.save("l64-sgs0",override=True)
---------------
---------------------------------------------------------------
Luigi Iapichino Zentrum fuer Astronomie der Universitaet Heidelberg Institut fuer Theoretische Astrophysik Albert-Ueberle-Str. 2, D-69120 Heidelberg, Germany Tel: +49 6221 548983, Fax: +49 6221 544221 e-mail: luigi@ita.uni-heidelberg.de URL: http://www.ita.uni-heidelberg.de/~luigi/
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
---------------------------------------------------------------
Luigi Iapichino Zentrum fuer Astronomie der Universitaet Heidelberg Institut fuer Theoretische Astrophysik Albert-Ueberle-Str. 2, D-69120 Heidelberg, Germany Tel: +49 6221 548983, Fax: +49 6221 544221 e-mail: luigi@ita.uni-heidelberg.de URL: http://www.ita.uni-heidelberg.de/~luigi/