Hi:
Does yt support 3D quiver plot equivalent to matplotlib?
If so could you direct me to an example of the same?
Thank you in advance
On Fri, Dec 18, 2015 at 12:52 PM,
Send yt-users mailing list submissions to yt-users@lists.spacepope.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org or, via email, send a message with subject or body 'help' to yt-users-request@lists.spacepope.org
You can reach the person managing the list at yt-users-owner@lists.spacepope.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of yt-users digest..."
Today's Topics:
1. PhasePlot losing negative values (Alex Hill) 2. Re: PhasePlot losing negative values (Nathan Goldbaum) 3. Re: PhasePlot losing negative values (Alex Hill)
----------------------------------------------------------------------
Message: 1 Date: Thu, 17 Dec 2015 15:55:15 -0500 From: Alex Hill
To: Discussion of the yt analysis package Subject: [yt-users] PhasePlot losing negative values Message-ID: Content-Type: text/plain; charset=utf-8 Hi,
I?m trying to create a PhasePlot of one component of velocity (which can be negative) as a function of temperature.
f = yt.PhasePlot(box, ?temperature?, ?velocity_z?,[?cell_mass?], weight_field=None,fractional=True) f.set_log(?velocity_z?, False) f.show()
This works as expected for cells with positive velocity. However, cells with negative velocities get completely dropped; everything with velocity_z <= 0 is blank.
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?
Running yt 3.2.2 and python 2.7 on a Mac.
Cheers, Alex
--------- Alex Hill Senior Postdoctoral Research Associate Office: KINSC Link L106 Department of Astronomy, Haverford College 370 Lancaster Ave, Haverford, PA 19041 USA phone: +1 484 297 2136 email/iMessage: ashill@haverford.edu
------------------------------
Message: 2 Date: Thu, 17 Dec 2015 15:13:29 -0600 From: Nathan Goldbaum
To: Discussion of the yt analysis package Subject: Re: [yt-users] PhasePlot losing negative values Message-ID: Content-Type: text/plain; charset="utf-8" Hi Alex,
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():
*https://gist.github.com/anonymous/4ec4fdfd66b0eee2015a https://gist.github.com/anonymous/4ec4fdfd66b0eee2015a*
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:
https://bitbucket.org/yt_analysis/yt/issues/new
Thanks!
-Nathan
On Thu, Dec 17, 2015 at 2:55 PM, Alex Hill
wrote: Hi,
I?m trying to create a PhasePlot of one component of velocity (which can be negative) as a function of temperature.
f = yt.PhasePlot(box, ?temperature?, ?velocity_z?,[?cell_mass?], weight_field=None,fractional=True) f.set_log(?velocity_z?, False) f.show()
This works as expected for cells with positive velocity. However, cells with negative velocities get completely dropped; everything with velocity_z <= 0 is blank.
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?
Running yt 3.2.2 and python 2.7 on a Mac.
Cheers, Alex
--------- Alex Hill Senior Postdoctoral Research Associate Office: KINSC Link L106 Department of Astronomy, Haverford College 370 Lancaster Ave, Haverford, PA 19041 USA phone: +1 484 297 2136 email/iMessage: ashill@haverford.edu
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-------------- next part -------------- An HTML attachment was scrubbed... URL: < http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/2015...
------------------------------
Message: 3 Date: Fri, 18 Dec 2015 11:02:14 -0500 From: Alex Hill
To: Discussion of the yt analysis package Subject: Re: [yt-users] PhasePlot losing negative values Message-ID: Content-Type: text/plain; charset=utf-8 Thanks, Nathan.
I was doing something similar to that but omitted it from what I included in my first email:
f = yt.PhasePlot(box, ?temperature?, ?velocity_z?,[?cell_mass?], weight_field=None,fractional=True) f.set_log(?velocity_z?, False) ax = f.plots[?cell_mass?].axes ax.set_ylim(-5e7,5e7) f.show()
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.
I?ll look into implementing the fix you suggest in a bit (or open an issue if I don?t get to it soon).
Cheers, Alex
On Dec 17, 2015, at 16:13, Nathan Goldbaum
wrote: Hi Alex,
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():
https://gist.github.com/anonymous/4ec4fdfd66b0eee2015a
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:
https://bitbucket.org/yt_analysis/yt/issues/new
Thanks!
-Nathan
On Thu, Dec 17, 2015 at 2:55 PM, Alex Hill
wrote: Hi, I?m trying to create a PhasePlot of one component of velocity (which can be negative) as a function of temperature.
f = yt.PhasePlot(box, ?temperature?, ?velocity_z?,[?cell_mass?], weight_field=None,fractional=True) f.set_log(?velocity_z?, False) f.show()
This works as expected for cells with positive velocity. However, cells with negative velocities get completely dropped; everything with velocity_z <= 0 is blank.
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?
Running yt 3.2.2 and python 2.7 on a Mac.
Cheers, Alex
--------- Alex Hill Senior Postdoctoral Research Associate Office: KINSC Link L106 Department of Astronomy, Haverford College 370 Lancaster Ave, Haverford, PA 19041 USA phone: +1 484 297 2136 email/iMessage: ashill@haverford.edu
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
------------------------------
Subject: Digest Footer
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
------------------------------
End of yt-users Digest, Vol 94, Issue 15 ****************************************
-- *SK2* *"**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.**"*
participants (1)
-
Sushilkumar