<div dir="ltr">I've opened an issue here: <a href="https://bitbucket.org/yt_analysis/yt/issue/857/add-support-for-symmetric-logarithmic">https://bitbucket.org/yt_analysis/yt/issue/857/add-support-for-symmetric-logarithmic</a></div>

<div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 16, 2014 at 4:09 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 dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="">On Wed, Jul 16, 2014 at 4:06 PM, John Zuhone <span dir="ltr"><<a href="mailto:jzuhone@gmail.com" target="_blank">jzuhone@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 Suoqing,<br>
<br>
Probably cannot do what you're looking for with PlotWindow, but you<br>
might want to try Matplotlib's symlog:<br>
<br>
<a href="http://matplotlib.org/examples/pylab_examples/symlog_demo.html" target="_blank">http://matplotlib.org/examples/pylab_examples/symlog_demo.html</a></blockquote><div><br></div></div><div>I didn't know this was a thing.  We could probably add support for it to PlotWindow.</div>

<div><div class="h5">
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
This is what the S-Z projection analysis module does, see the images<br>
of the S-Z decrement/increment here:<br>
<br>
<a href="http://yt-project.org/doc/analyzing/analysis_modules/sunyaev_zeldovich.html" target="_blank">http://yt-project.org/doc/analyzing/analysis_modules/sunyaev_zeldovich.html</a><br>
<br>
If you look in the code in<br>
<a href="http://yt.analysis_modules.sunyaev_zeldovich.projection.py" target="_blank">yt.analysis_modules.sunyaev_zeldovich.projection.py</a>, the SZProjection<br>
class has a write_png method that uses the symlog in a color plot.<br>
<br>
So my suggestion would be to write your image to a fixed resolution<br>
buffer and plot it directly with Matplotlib's imshow using the symlog<br>
scaling on the colorbar.<br>
<br>
Best,<br>
<br>
John<br>
<div><div><br>
On Wed, Jul 16, 2014 at 6:53 PM, Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>> wrote:<br>
><br>
><br>
><br>
> On Wed, Jul 16, 2014 at 3:50 PM, Suoqing JI <<a href="mailto:suoqing@physics.ucsb.edu" target="_blank">suoqing@physics.ucsb.edu</a>><br>
> wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> I understand that typically the negative values would appear as white<br>
>> color on a log slice plot. However, if I directly plot the fields that are<br>
>> generically defined in FLASH, the negative values DO appear correctly. For<br>
>> example, the velx field: <a href="http://pbrd.co/1jz3iqR" target="_blank">http://pbrd.co/1jz3iqR</a>.<br>
><br>
><br>
> Yup - that plot is on a linear scale.  I believe the FLASH frontend has it<br>
> explicitly defined *not* to log-scale velx.<br>
><br>
>><br>
>><br>
>> But for any derived fields, for example, defining velx1 = 1.*velx, the<br>
>> negative values appear white again: <a href="http://pbrd.co/1jz4oD8" target="_blank">http://pbrd.co/1jz4oD8</a>.<br>
><br>
><br>
> That happens because the default for a derived field is to log scale the<br>
> field in plots.<br>
><br>
>><br>
>><br>
>> So, is there anyway to show both positive and negative values on a log<br>
>> slice plot for derived fields (I’m using YT2)?<br>
>><br>
><br>
> Nope.  In general you can't show negative values on a log-scaled plot.<br>
><br>
> You could plot the absolute value of a field but then you aren't really<br>
> plotting the field as such.<br>
><br>
> What is the visualization goal you are trying to accomplish here?<br>
><br>
>><br>
>> Thanks!<br>
>><br>
>> Best wishes,<br>
>> --<br>
>> Suoqing JI<br>
>> Ph.D Student<br>
>> Department of Physics<br>
>> University of California, Santa Barbara<br>
>> CA 93106, USA<br>
>><br>
>><br>
>> _______________________________________________<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>
>><br>
><br>
><br>
> _______________________________________________<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>
><br>
<br>
<br>
<br>
</div></div><span><font color="#888888">--<br>
John ZuHone<br>
<br>
Postdoctoral Researcher<br>
NASA/Goddard Space Flight Center<br>
<br>
<a href="mailto:jzuhone@gmail.com" target="_blank">jzuhone@gmail.com</a><br>
<a href="mailto:john.zuhone@nasa.gov" target="_blank">john.zuhone@nasa.gov</a><br>
</font></span><div><div>_______________________________________________<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>
</div></div></blockquote></div></div></div><br></div></div>
</blockquote></div><br></div>