Hi all, Is there a convenient way to rotate a slice or projection plot (with associated axis labels and tick marks) in yt? My simulation domain is long and skinny, and yt automatically plots it with the long edge aligned horizontally; I'd like to rotate these 2D plots by 90 degrees. I've combed through the docs and the only way I can think to do it would be to create a fixed resolution buffer and then manipulate it via matplotlib functions. The camera seems only applicable for 3D (and doesn't paint the axes, so far as I can tell). Any ideas or pointers to docs? Thanks, Jason ---- Jason Galyardt jeg@uga.edu Department of Physics and Astronomy University of Georgia _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
On Monday, May 18, 2015, Jason Galyardt
Hi all,
Is there a convenient way to rotate a slice or projection plot (with associated axis labels and tick marks) in yt? My simulation domain is long and skinny, and yt automatically plots it with the long edge aligned horizontally; I'd like to rotate these 2D plots by 90 degrees.
I've wanted to add the ability to select the color at orientation for a while now, but right now the colorbar os assumed to be vertical.
I've combed through the docs and the only way I can think to do it would be to create a fixed resolution buffer and then manipulate it via matplotlib functions. The camera seems only applicable for 3D (and doesn't paint the axes, so far as I can tell).
This is likely the easiest way to do it right now. http://yt-project.org/docs/dev/visualizing/manual_plotting.html
Any ideas or pointers to docs?
Thanks,
Jason
---- Jason Galyardt jeg@uga.edu javascript:_e(%7B%7D,'cvml','jeg@uga.edu'); Department of Physics and Astronomy University of Georgia
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Just want to add that this functionality is something I recently found a
need for. Is it perhaps possible to generate the camera object first,
rotate it, and then take a slice?
Max Katz
Ph.D. Candidate, Department of Physics and Astronomy
Vice President, Graduate Student Organization
Stony Brook University
http://astro.sunysb.edu/mkatz/
On Mon, May 18, 2015 at 11:37 AM, Nathan Goldbaum
On Monday, May 18, 2015, Jason Galyardt
wrote: Hi all,
Is there a convenient way to rotate a slice or projection plot (with associated axis labels and tick marks) in yt? My simulation domain is long and skinny, and yt automatically plots it with the long edge aligned horizontally; I'd like to rotate these 2D plots by 90 degrees.
I've wanted to add the ability to select the color at orientation for a while now, but right now the colorbar os assumed to be vertical.
I've combed through the docs and the only way I can think to do it would be to create a fixed resolution buffer and then manipulate it via matplotlib functions. The camera seems only applicable for 3D (and doesn't paint the axes, so far as I can tell).
This is likely the easiest way to do it right now.
http://yt-project.org/docs/dev/visualizing/manual_plotting.html
Any ideas or pointers to docs?
Thanks,
Jason
---- Jason Galyardt jeg@uga.edu Department of Physics and Astronomy University of Georgia
_______________________________________________ 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
On Wednesday, May 20, 2015, Max Katz
Just want to add that this functionality is something I recently found a need for. Is it perhaps possible to generate the camera object first, rotate it, and then take a slice?
We were talking about slices and projections earlier in this thread, there is no camera in those cases. The problem there is that the plot layouts are hard-coded to some degree and someone would need to generalize the layout logic to handle horizontal colorbars. It's not *too* complicated, but care needs to be taken to ensure plots look good in as many cases as possible. As with most improvements we want to make, we're limited by contributor time. Just in case you're interested in hacking on yt internals, the layout code in question is here: https://bitbucket.org/yt_analysis/yt/src/369077df8a967253dc53969430550b0c30c... This is called when we set up each individual plot in one of the image plot containers defined in yt/visualization/plot_window.py. Axis-aligned slices and projections need to be locked to the coordinate axes, but off-axis slices and projections as well as volume renderings allow arbitrary rotation of the image plane. This works right now. While it would be nice if yt's plotting code could make "nice" plots out of the box for any kind of data thrown at it, that is not the case right now. That's one of the reasons why we expose everything you need to make a custom plot based on the image buffers returned by a FixedResolutionBuffer object.
Max Katz Ph.D. Candidate, Department of Physics and Astronomy Vice President, Graduate Student Organization Stony Brook University http://astro.sunysb.edu/mkatz/
On Mon, May 18, 2015 at 11:37 AM, Nathan Goldbaum
javascript:_e(%7B%7D,'cvml','nathan12343@gmail.com');> wrote: On Monday, May 18, 2015, Jason Galyardt
javascript:_e(%7B%7D,'cvml','jason.galyardt@gmail.com');> wrote: Hi all,
Is there a convenient way to rotate a slice or projection plot (with associated axis labels and tick marks) in yt? My simulation domain is long and skinny, and yt automatically plots it with the long edge aligned horizontally; I'd like to rotate these 2D plots by 90 degrees.
I've wanted to add the ability to select the color at orientation for a while now, but right now the colorbar os assumed to be vertical.
I've combed through the docs and the only way I can think to do it would be to create a fixed resolution buffer and then manipulate it via matplotlib functions. The camera seems only applicable for 3D (and doesn't paint the axes, so far as I can tell).
This is likely the easiest way to do it right now.
http://yt-project.org/docs/dev/visualizing/manual_plotting.html
Any ideas or pointers to docs?
Thanks,
Jason
---- Jason Galyardt jeg@uga.edu Department of Physics and Astronomy University of Georgia
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org javascript:_e(%7B%7D,'cvml','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
participants (3)
-
Jason Galyardt
-
Max Katz
-
Nathan Goldbaum