<div dir="ltr"><div><div>Hi:<br><br></div>Does yt support 3D quiver plot equivalent to matplotlib?<br>If so could you direct me to an example of the same?<br><br></div>Thank you in advance<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 18, 2015 at 12:52 PM,  <span dir="ltr"><<a href="mailto:yt-users-request@lists.spacepope.org" target="_blank">yt-users-request@lists.spacepope.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send yt-users mailing list submissions to<br>
        <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<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>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:yt-users-request@lists.spacepope.org">yt-users-request@lists.spacepope.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:yt-users-owner@lists.spacepope.org">yt-users-owner@lists.spacepope.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of yt-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. PhasePlot losing negative values (Alex Hill)<br>
   2. Re: PhasePlot losing negative values (Nathan Goldbaum)<br>
   3. Re: PhasePlot losing negative values (Alex Hill)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 17 Dec 2015 15:55:15 -0500<br>
From: Alex Hill <<a href="mailto:ashill@haverford.edu">ashill@haverford.edu</a>><br>
To: Discussion of the yt analysis package<br>
        <<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>><br>
Subject: [yt-users] PhasePlot losing negative values<br>
Message-ID: <<a href="mailto:AE0250F8-7C84-4468-AFEE-3479E5A0499E@haverford.edu">AE0250F8-7C84-4468-AFEE-3479E5A0499E@haverford.edu</a>><br>
Content-Type: text/plain; charset=utf-8<br>
<br>
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: +1 484 297 2136<br>
email/iMessage: <a href="mailto:ashill@haverford.edu">ashill@haverford.edu</a><br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 17 Dec 2015 15:13:29 -0600<br>
From: Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>><br>
To: Discussion of the yt analysis package<br>
        <<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>><br>
Subject: Re: [yt-users] PhasePlot losing negative values<br>
Message-ID:<br>
        <CAJXewOnmcLgLVgRaKKuZfW+ymmF=3o3xruBfE=<a href="mailto:V97SnFuwD7vg@mail.gmail.com">V97SnFuwD7vg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi Alex,<br>
<br>
So I think what's happening is that the call to set_log() doesn't cause the<br>
plot limits for the velocity_z axis to be rescaled, cutting off the<br>
negative values in the plot. This can be fixed by calling set_ylim() after<br>
set_log():<br>
<br>
*<a href="https://gist.github.com/anonymous/4ec4fdfd66b0eee2015a" rel="noreferrer" target="_blank">https://gist.github.com/anonymous/4ec4fdfd66b0eee2015a</a><br>
<<a href="https://gist.github.com/anonymous/4ec4fdfd66b0eee2015a" rel="noreferrer" target="_blank">https://gist.github.com/anonymous/4ec4fdfd66b0eee2015a</a>>*<br>
<br>
I think a good enhancement would be to somehow invalidate the plot limits<br>
after calling set_log() so the y-axis limits are automatically<br>
re-determined. I think this would be a reasonably straightforward fix and a<br>
good first yt contribution if you're up for it. If you're not interested in<br>
working on that yourself, can you go ahead and open an issue so we don't<br>
lose this in the shuffle:<br>
<br>
<a href="https://bitbucket.org/yt_analysis/yt/issues/new" rel="noreferrer" target="_blank">https://bitbucket.org/yt_analysis/yt/issues/new</a><br>
<br>
Thanks!<br>
<br>
-Nathan<br>
<br>
On Thu, Dec 17, 2015 at 2:55 PM, Alex Hill <<a href="mailto:ashill@haverford.edu">ashill@haverford.edu</a>> wrote:<br>
<br>
> Hi,<br>
><br>
> I?m trying to create a PhasePlot of one component of velocity (which can<br>
> be negative) as a function of temperature.<br>
><br>
> f = yt.PhasePlot(box, ?temperature?, ?velocity_z?,[?cell_mass?],<br>
> 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<br>
> with negative velocities get completely dropped; everything with velocity_z<br>
> <= 0 is blank.<br>
><br>
> I assume that PhasePlot took the logarithm of velocity_z at some point in<br>
> producing the plot and lost negative data. Is there an option I?m missing<br>
> 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: +1 484 297 2136<br>
> email/iMessage: <a href="mailto:ashill@haverford.edu">ashill@haverford.edu</a><br>
><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" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20151217/59b0f4a4/attachment.html" rel="noreferrer" target="_blank">http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20151217/59b0f4a4/attachment.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Fri, 18 Dec 2015 11:02:14 -0500<br>
From: Alex Hill <<a href="mailto:ashill@haverford.edu">ashill@haverford.edu</a>><br>
To: Discussion of the yt analysis package<br>
        <<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>><br>
Subject: Re: [yt-users] PhasePlot losing negative values<br>
Message-ID: <<a href="mailto:EB53655E-A427-44B4-8D64-3872026C76CB@haverford.edu">EB53655E-A427-44B4-8D64-3872026C76CB@haverford.edu</a>><br>
Content-Type: text/plain; charset=utf-8<br>
<br>
Thanks, Nathan.<br>
<br>
I was doing something similar to that but omitted it from what I included in my first email:<br>
<br>
f = yt.PhasePlot(box, ?temperature?, ?velocity_z?,[?cell_mass?], weight_field=None,fractional=True)<br>
f.set_log(?velocity_z?, False)<br>
ax = f.plots[?cell_mass?].axes<br>
ax.set_ylim(-5e7,5e7)<br>
f.show()<br>
<br>
It turns out that I was running yt 3.1 (though I thought I was running 3.2.2). In 3.1, the whole range was shown after the ax.set_ylim step, but everything at velocity_z <= 0 was white. I see that improved handling of f.set_ylim in this case was noted in the 3.2 release notes. After successfully updating to 3.2.2, with the f.set_ylim step, this works as expected.<br>
<br>
I?ll look into implementing the fix you suggest in a bit (or open an issue if I don?t get to it soon).<br>
<br>
Cheers,<br>
 Alex<br>
<br>
> On Dec 17, 2015, at 16:13, Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>> wrote:<br>
><br>
> Hi Alex,<br>
><br>
> 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():<br>
><br>
> <a href="https://gist.github.com/anonymous/4ec4fdfd66b0eee2015a" rel="noreferrer" target="_blank">https://gist.github.com/anonymous/4ec4fdfd66b0eee2015a</a><br>
><br>
> 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:<br>
><br>
> <a href="https://bitbucket.org/yt_analysis/yt/issues/new" rel="noreferrer" target="_blank">https://bitbucket.org/yt_analysis/yt/issues/new</a><br>
><br>
> Thanks!<br>
><br>
> -Nathan<br>
><br>
> On Thu, Dec 17, 2015 at 2:55 PM, Alex Hill <<a href="mailto:ashill@haverford.edu">ashill@haverford.edu</a>> wrote:<br>
> 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: +1 484 297 2136<br>
> email/iMessage: <a href="mailto:ashill@haverford.edu">ashill@haverford.edu</a><br>
><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" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
><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" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br>
<br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<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" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br>
<br>
------------------------------<br>
<br>
End of yt-users Digest, Vol 94, Issue 15<br>
****************************************<br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><span style="border-collapse:collapse"><div style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b><i>SK<sup>2</sup></i></b></span></div><div style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b><i><sup><br></sup></i></b></span></div><div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;border-collapse:collapse"><b><sup>"</sup></b></span><font color="#500050" face="arial, sans-serif"><b>Claiming that something can move faster than light is a good conversation-stopper in physics. People edge away from you in cocktail parties; friends never return phone calls. You just don’t mess with Albert Einstein.</b></font><b style="color:rgb(80,0,80);font-family:arial,sans-serif"><sup>"</sup></b></div><div style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px"><br></div></span></div>
</div>