Hi Nathan,<div><br></div><div>      Thanks for the tips. I think the fixed-resolution buffer is exactly what I need here. Unfortunately, when I run the command:</div><div><br></div><div><pre style="margin-top:0px;margin-bottom:0px;padding:0px;color:rgb(0,0,0);line-height:22.399999618530273px;text-align:justify">
<b><span class="" style="margin:0px;padding:0px">frb</span> <span class="" style="margin:0px;padding:0px;color:rgb(102,102,102)">=</span> <span class="" style="margin:0px;padding:0px">proj</span><span class="" style="margin:0px;padding:0px;color:rgb(102,102,102)">.</span><span class="" style="margin:0px;padding:0px">to_frb</span><span class="" style="margin:0px;padding:0px">(</span><span class="" style="margin:0px;padding:0px">width</span><span class="" style="margin:0px;padding:0px">,</span> <span class="" style="margin:0px;padding:0px">res</span><span class="" style="margin:0px;padding:0px">,</span> <span class="" style="margin:0px;padding:0px">center</span><span class="" style="margin:0px;padding:0px;color:rgb(102,102,102)">=</span><span class="" style="margin:0px;padding:0px">c</span><span class="" style="margin:0px;padding:0px">)</span></b></pre>
<br>     I get the error<br><br></div><div><div><font face="courier new, monospace"><b>Traceback (most recent call last):</b></font></div><div><font face="courier new, monospace"><b>  File "smllPlt.py", line 16, in <module></b></font></div>
<div><font face="courier new, monospace"><b>    frb = proj.to_frb(width,res)</b></font></div><div><font face="courier new, monospace"><b>AttributeError: 'AMRQuadTreeProj' object has no attribute 'to_frb'</b></font></div>
</div><div><br></div><div>      I tried updating my version of yt and deleting any .yt files, but the error stuck.</div><div><br></div><div>           best,</div><div>             Munier</div><div><br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Nov 28, 2012 at 2:34 PM, Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div>Hi Munier,</div><div><br></div><div>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.</div>
<div><br></div><div>I think you have two options.  One would be to use a linear colorbar.  You can do this following the instructions here: <a href="http://yt-project.org/doc/faq/index.html#how-do-i-modify-whether-or-not-yt-takes-the-log-of-a-particular-field" target="_blank">http://yt-project.org/doc/faq/index.html#how-do-i-modify-whether-or-not-yt-takes-the-log-of-a-particular-field</a></div>
<div><br></div><div>Another 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: <a href="http://yt-project.org/doc/visualizing/manual_plotting.html?highlight=manual%20plotting" target="_blank">http://yt-project.org/doc/visualizing/manual_plotting.html?highlight=manual%20plotting</a></div>
<div><br></div><div>In 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.</div>
<div><br></div><div>Cheers,</div><div><br></div><div>Nathan</div><br><div><div><div class="h5"><div>On Nov 28, 2012, at 9:29 AM, Munier Azzam Salem wrote:</div><br></div></div><blockquote type="cite"><div><div class="h5">
<div>Hi yt gurus,</div><div><br></div><div>      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?</div>

<div><br></div><div>       thanks!</div><div>           Munier</div><div><br></div>I've attached an image of what gets plotted, and the relevant bits of my script are:<div><br></div><div><div><font face="courier new, monospace"><b>from yt.mods import *</b></font></div>

<div><font face="courier new, monospace"><b><br></b></font></div><div><font face="courier new, monospace"><b>fName = "DD0006/test_sim_0006"</b></font></div><div><font face="courier new, monospace"><b>var   = "star_density"</b></font></div>

<div><font face="courier new, monospace"><b>axis  = 0</b></font></div><div><font face="courier new, monospace"><b><br></b></font></div><div><font face="courier new, monospace"><b>pf = load(fName)</b></font></div><div><font face="courier new, monospace"><b>pf.h</b></font></div>

<div><font face="courier new, monospace"><b><br></b></font></div><div><font face="courier new, monospace"><b>pc = PlotCollection(pf)</b></font></div><div><font face="courier new, monospace"><b>p = pc.add_projection(var,axis)</b></font></div>

<div><font face="courier new, monospace"><b>#p.modify["particles"](1.0)</b></font></div><div><font face="courier new, monospace"><b><br></b></font></div><div><font face="courier new, monospace"><b>radius = .02;</b></font></div>

<div><font face="courier new, monospace"><b><br></b></font></div><div><font face="courier new, monospace"><b>pc.set_xlim(.5-radius,.5+radius)</b></font></div><div><font face="courier new, monospace"><b>pc.set_ylim(.5-radius,.5+radius)</b></font></div>

<div><font face="courier new, monospace"><b><br></b></font></div><div><font face="courier new, monospace"><b>pc.save(fName)</b></font></div><div><br></div><div><br></div>-- <br>Munier A. Salem // <a href="tel:845.489.6450" value="+18454896450" target="_blank">845.489.6450</a><br>

</div>
</div></div><span><test_sim_0006_Projection_x_star_density.png></span>_______________________________________________<br>yt-users mailing list<br><a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br></blockquote></div><br></div><br>_______________________________________________<br>

yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Munier A. Salem // 845.489.6450<br>
</div>