Although it occurs to me that you might be able to work around this behavior by doing something like:<div><br></div><div>slc = SlicePlot(ds, 'x', 'density')</div>slc.set_zlim('density', 1e-4, 1e-0)<div>
slc.set_log('density', True)</div><div><br></div><div>The key here is to call set_log after set_zlim.</div><div><br></div><div>Just for some context: it is set up that way to avoid a crash in matplotlib <span></span>which does not like creating logarithmic colorbars for data with zero dynamic range.</div>
<div><br></div><div>Hope that's helpful,</div><div><br></div><div>Nathan</div><div><div><br>On Saturday, May 17, 2014, Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ah, thanks for the report - I replied hastily before getting on a plane without looking at the source.<div><br></div><div>
I'll look at this tomorrow.</div><div><br></div><div>Nathan<span></span><br><br>On Saturday, May 17, 2014, Chang-Goo Kim <<a href="javascript:_e(%7B%7D,'cvml','cgkim@astro.princeton.edu');" target="_blank">cgkim@astro.princeton.edu</a>> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Nathan,<div><br></div><div>I did set the limits explicitly, but yt switches colorer before it saves. See below for the link for my source code and the last part of error message.</div>

<div><br></div><div>
Chang-Goo</div><div><br></div><div><br></div><a href="http://paste.yt-project.org/show/4645/" target="_blank">http://paste.yt-project.org/show/4645/</a><div><br></div><div><br>yt : [INFO     ] 2014-05-17 23:29:15,766 Making a fixed resolution buffer of (('gas', 'pok')) 512 by 512<br>


<br>yt : [INFO     ] 2014-05-17 23:29:15,780 Making a fixed resolution buffer of (('athena', 'density')) 512 by 512<br><br>yt : [INFO     ] 2014-05-17 23:29:15,795 Making a fixed resolution buffer of (('gas', 'nH')) 512 by 512<br>


<br>yt : [INFO     ] 2014-05-17 23:29:15,810 Making a fixed resolution buffer of (('gas', 'density')) 512 by 512<br><br>yt : [INFO     ] 2014-05-17 23:29:15,825 Making a fixed resolution buffer of (('gas', 'temp')) 512 by 512<br>


<br>yt : [INFO     ] 2014-05-17 23:29:15,839 Making a fixed resolution buffer of (('athena', 'pressure')) 512 by 512<br><br>yt : [INFO     ] 2014-05-17 23:29:15,854 Making a fixed resolution buffer of (('gas', 'pressure')) 512 by 512<br>


<br>yt : [WARNING  ] 2014-05-17 23:29:15,889 Plot image for field ('gas', 'nH') has zero dynamic range. Min = Max = 3.<br><br>yt : [WARNING  ] 2014-05-17 23:29:15,889 Switching to linear colorbar scaling.<br>


<br>yt : [WARNING  ] 2014-05-17 23:29:16,364 Plot image for field ('gas', 'nH') has zero dynamic range. Min = Max = 3.<br><br>yt : [WARNING  ] 2014-05-17 23:29:16,364 Switching to linear colorbar scaling.<br>


<br>yt : [INFO     ] 2014-05-17 23:29:17,385 Saving plot /scratch/gpfs/changgoo/sntest_TI/png/n2_SN_dx2_L256_TE_multi_fm3/n2_SN_dx2_L256_TE_multi_fm3.0000_Slice_z_temp.png<br><br>yt : [INFO     ] 2014-05-17 23:29:17,916 Saving plot /scratch/gpfs/changgoo/sntest_TI/png/n2_SN_dx2_L256_TE_multi_fm3/n2_SN_dx2_L256_TE_multi_fm3.0000_Slice_z_nH.png<div>


<br></div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, May 17, 2014 at 7:50 PM, Nathan Goldbaum <span dir="ltr"><<a>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">Hi Chang-Goo<div><br></div><div>If you explicitly set the limits of the colorbar using the set_zlim function you will avoid the zero dynamic range check.  That will also keep the colorbar limits the same from frame to frame.</div>


<span><font color="#888888">
<div><br></div></font></span><div><span><font color="#888888">Nathan</font></span><div><div><span></span><br><br>On Saturday, May 17, 2014, Chang-Goo Kim <<a>cgkim@astro.princeton.edu</a>> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div>Hi all,<br><br></div>When initial condition is uniform, it has zero dynamic range. Although it has no dynamic range, sometimes I need to plot it with log scale colorbar to make a movie with the same colorbar for later times. But, yt forced switch to linear colorbar. How can I make yt not to do that.<br>




<br></div>Thanks,<br><br></div>Chang-Goo<br></div>
</blockquote></div></div></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a>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></div>
</blockquote></div>
</blockquote></div></div>