<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Nathan, John,<div><br></div><div>The example I gave does be on a linear scale and not appropriate… but yes, John’s information is exactly I want.</div><div><br></div><div>Although it might be possible to superpose two plots (one positive and one negative) with two color bars, but it appears a little bit redundant.</div><div><br></div><div>Thanks a lot!</div><div><br></div><div>Best wishes,</div><div>Suoqing</div><div><br></div><div><div><div>On Jul 16, 2014, at 4:09 PM, Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class="gmail_extra"><br class="Apple-interchange-newline"><br><br><div class="gmail_quote">On Wed, Jul 16, 2014 at 4:06 PM, John Zuhone<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:jzuhone@gmail.com" target="_blank">jzuhone@gmail.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: 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>I didn't know this was a thing.  We could probably add support for it to PlotWindow.</div><div> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: 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 class="HOEnZb"><div class="h5"><br>On Wed, Jul 16, 2014 at 6:53 PM, Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">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">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:<span class="Apple-converted-space"> </span><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:<span class="Apple-converted-space"> </span><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>>><span class="Apple-converted-space"> </span><a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>>><span class="Apple-converted-space"> </span><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>><span class="Apple-converted-space"> </span><a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>><span class="Apple-converted-space"> </span><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 class="HOEnZb"><font color="#888888">--<br>John ZuHone<br><br>Postdoctoral Researcher<br>NASA/Goddard Space Flight Center<br><br><a href="mailto:jzuhone@gmail.com">jzuhone@gmail.com</a><br><a href="mailto:john.zuhone@nasa.gov">john.zuhone@nasa.gov</a><br></font></span><div class="HOEnZb"><div class="h5">_______________________________________________<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></div></div></blockquote></div><br></div></div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">yt-users mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><a href="mailto:yt-users@lists.spacepope.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">yt-users@lists.spacepope.org</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a></blockquote></div><br></div></body></html>