Hi Nathan,
frb = proj.to_frb(width, res, center=c)
Hi Munier,I suspect that the projection of the particle field is zero in the locations that are colored white in your image. This causes these regions to 'fall off' the bottom end of the logarithmic color bar.I think you have two options. One would be to use a linear colorbar. You can do this following the instructions here: http://yt-project.org/doc/faq/index.html#how-do-i-modify-whether-or-not-yt-takes-the-log-of-a-particular-fieldAnother option would be to make the plot by hand using a FixedResolutionBuffer. In this case you would make the projection object by hand, extract the raw image buffer using an FRB, and then make the plot manually using matplotlib. There's an example in the yt docs that covers how to do this: http://yt-project.org/doc/visualizing/manual_plotting.html?highlight=manual%20plottingIn the latter case if you want the areas that project to zero to appear with a logarithmic colorbar, you'll need to manually set the regions in the FRB that are equal to zero to some small number.Cheers,NathanOn Nov 28, 2012, at 9:29 AM, Munier Azzam Salem wrote:<test_sim_0006_Projection_x_star_density.png>_______________________________________________Hi yt gurus,I've been making projections of star_density from enzo output files and they seem to be working out fine. However, wherever particles do not exist the background remains white instead of following my chosen colormap. Is there a way to paint these areas to follow the colormap?thanks!MunierI've attached an image of what gets plotted, and the relevant bits of my script are:from yt.mods import *fName = "DD0006/test_sim_0006"var = "star_density"axis = 0pf = load(fName)pf.hpc = PlotCollection(pf)p = pc.add_projection(var,axis)#p.modify["particles"](1.0)radius = .02;pc.set_xlim(.5-radius,.5+radius)pc.set_ylim(.5-radius,.5+radius)pc.save(fName)--
Munier A. Salem // 845.489.6450
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