<div dir="ltr">Hi Alex,<div><br></div><div>So I think what's happening is that the call to set_log() doesn't cause the plot limits for the velocity_z axis to be rescaled, cutting off the negative values in the plot. This can be fixed by calling set_ylim() after set_log():</div><div><br></div><div><font color="#1155cc"><u><a href="https://gist.github.com/anonymous/4ec4fdfd66b0eee2015a">https://gist.github.com/anonymous/4ec4fdfd66b0eee2015a</a></u></font><br></div><div><br></div><div>I think a good enhancement would be to somehow invalidate the plot limits after calling set_log() so the y-axis limits are automatically re-determined. I think this would be a reasonably straightforward fix and a good first yt contribution if you're up for it. If you're not interested in working on that yourself, can you go ahead and open an issue so we don't lose this in the shuffle:</div><div><br></div><div><a href="https://bitbucket.org/yt_analysis/yt/issues/new" target="_blank">https://bitbucket.org/yt_analysis/yt/issues/new</a><br></div><div><br></div><div>Thanks!</div><div><br></div><div>-Nathan</div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 17, 2015 at 2:55 PM, Alex Hill <span dir="ltr"><<a href="mailto:ashill@haverford.edu" target="_blank">ashill@haverford.edu</a>></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,<br>
<br>
I’m trying to create a PhasePlot of one component of velocity (which can be negative) as a function of temperature.<br>
<br>
f = yt.PhasePlot(box, ‘temperature’, ‘velocity_z’,[‘cell_mass’], weight_field=None,fractional=True)<br>
f.set_log(‘velocity_z’, False)<br>
f.show()<br>
<br>
This works as expected for cells with positive velocity. However, cells with negative velocities get completely dropped; everything with velocity_z <= 0 is blank.<br>
<br>
I assume that PhasePlot took the logarithm of velocity_z at some point in producing the plot and lost negative data. Is there an option I’m missing to tell PhasePlot not to do this?<br>
<br>
Running yt 3.2.2 and python 2.7 on a Mac.<br>
<br>
Cheers,<br>
 Alex<br>
<br>
---------<br>
Alex Hill<br>
Senior Postdoctoral Research Associate<br>
Office: KINSC Link L106<br>
Department of Astronomy, Haverford College<br>
370 Lancaster Ave, Haverford, PA 19041 USA<br>
phone: <a href="tel:%2B1%20484%20297%202136" value="+14842972136" target="_blank">+1 484 297 2136</a><br>
email/iMessage: <a href="mailto:ashill@haverford.edu" target="_blank">ashill@haverford.edu</a><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" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</blockquote></div><br></div></div></div>