Setting limits on OffAxisProjection plots manually

Hi all, I apologize for bombarding the mailing list this past bit, but hopefully this should be the last question that I have. I'm trying to set aysmmetric units on a projection plot (i.e. xlim=[-10,40] and ylim=[-35,35] in kpc. However, there is not a set_xlim or set_ylim option for off axis projection plots. The idea that I had was to use the pan function. Since my box is 100 kpc in each direction, in code units, I attempted to set the width of my box: #read in my data with the proper north and normal vectors to get the orientation right proj = OffAxisProjectionPlot(ds,normal,'density',center=gal_center,north_vector=north) #this should set the box to be 50 kpc in the x direction and 70 kpc in the y direction proj.set_width((.5,.7)) #pan the box 15 kpc to the right proj.pan((0.15,0)) proj.show() However, when I show the plot, the pan() function has not shifted it at all. Is there a way to manually set the limits to what I need to, or to properly use the pan function? Thanks again for all the help, you guys have been great about getting back to me quickly. Best, David

Hi! This is a bit of a breakdown in the difference between off axis projections and other types of plots. In general you can't pan them, if I remember correctly, because it's a wrapper around a more expensive operation (a type of volume rendering.) You may need to recreate it to move the field of view. Matt PS don't worry about emailing the list - it's what it's here for! Glad things are working out. On Jun 23, 2017 6:53 AM, "Setton, David Jonathan - (davidsetton)" < davidsetton@email.arizona.edu> wrote:
Hi all,
I apologize for bombarding the mailing list this past bit, but hopefully this should be the last question that I have. I'm trying to set aysmmetric units on a projection plot (i.e. xlim=[-10,40] and ylim=[-35,35] in kpc. However, there is not a set_xlim or set_ylim option for off axis projection plots. The idea that I had was to use the pan function. Since my box is 100 kpc in each direction, in code units, I attempted to set the width of my box:
#read in my data with the proper north and normal vectors to get the orientation right
proj = OffAxisProjectionPlot(ds,normal,'density',center=gal_center,north_vector=north)
#this should set the box to be 50 kpc in the x direction and 70 kpc in the y direction
proj.set_width((.5,.7))
#pan the box 15 kpc to the right
proj.pan((0.15,0))
proj.show()
However, when I show the plot, the pan() function has not shifted it at all. Is there a way to manually set the limits to what I need to, or to properly use the pan function?
Thanks again for all the help, you guys have been great about getting back to me quickly.
Best,
David
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (2)
-
Matthew Turk
-
Setton, David Jonathan - (davidsetton)