# [yt-users] OffAxisProjection axes problems

Nathan Goldbaum nathan12343 at gmail.com
Thu Jun 2 17:14:52 PDT 2016

```On Thu, Jun 2, 2016 at 6:45 PM, Stephanie Tonnesen <stonnes at gmail.com>
wrote:

> Hi all,
>
> The quick summary of what I want to do is switch the coordinates of the
> x-axis on a OffAxisProjection plot.  Basically, what I am trying to do is
> get a LOS look at a galaxy , so I need a 20 degree tilt in the y-z plane.
> For some reason this is swapping the x-axis direction from my plain old y
> slice.  The relevant parts of my code look like this:
>
> ds.coordinates.x_axis = 0
>     ds.coordinates.x_axis['y'] = 0
>     ds.coordinates.y_axis = 2
>     ds.coordinates.y_axis['y'] = 2
>

Is the orientation correct (albeit with z along the horizontal axis and x
along the vertical axis) if you don't do this ^ ?

What happens if you make an off-axis projection aligned with the y axis,
i.e. L = [0, 1, 0], north_vector = [0, 0, 1]?

Can you try making an off-axis projection of the 'x' and 'z' fields?

>
>     plot6=yt.SlicePlot(ds,"y","density")
>     plot6.save()
>
>     plot8=yt.SlicePlot(ds,"y","velocity_z")
>     plot8.save()
>
>     plot9 = yt.SlicePlot(ds,"y","velocity_y")
>     plot9.save()
>
>     plot10 = yt.SlicePlot(ds,"y","velocity_x")
>     plot10.save()
>
>     ds.periodicity=(True,True,True)
>
>     L = [0.0,0.93969,-0.342]
>     #W = [0.5,0.5,0.5]
>     #c = [0.5,0.5,0.5]
>     #N = 1028
>     north_vector = [0,0.342,0.93969]
>     plot12 =
> yt.OffAxisProjectionPlot(ds,L,'density',width=(100,'kpc'),north_vector=north_vector)
>     plot12.save()
>
>     plot13 =
> yt.OffAxisProjectionPlot(ds,L,'velocity_x',width=(100,'kpc'),north_vector=north_vector)
>     plot13.save()
>     plot14 =
> yt.OffAxisProjectionPlot(ds,L,'velocity_y',width=(100,'kpc'),north_vector=north_vector)
>     plot14.save()
>     plot15 =
> yt.OffAxisProjectionPlot(ds,L,'velocity_z',width=(100,'kpc'),north_vector=north_vector)
>     plot15.save()
>
> I have attached four files:  the slices of velocity_y and velocity_x and
> the OffAxisProjections of the same.  You can see that the x-axis seems to
> be flipped.  You will also notice that the OffAxisProjection is more zoomed
> than the Slice, but don't let this distract you :)
>
> I have no idea what has gone wrong here.  Any help, as always, is really
> appreciated.
>
> Thanks,
> Stephanie
> --
> Dr. Stephanie Tonnesen
> Alvin E. Nashman Postdoctoral Fellow
> stonnes at gmail.com
>
> _______________________________________________
> yt-users mailing list
> yt-users at 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/20160602/733e88c8/attachment-0001.html>
```