<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi everyone!<div class=""><br class=""></div><div class="">I’m trying to invert the horizontal axis on some simple projection plots. I’m trying to get a projection along the x axis, with y as the vertical and z as the horizontal axis where the horizontal/z axis is inverted, with the horizontal/z axis decreasing from left to right. Here’s the relevant code:</div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgba(0, 0, 0, 0.85098);"><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures;">ds.coordinates.x_axis[0] = 2</span></div><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures;">ds.coordinates.x_axis['x'] = 2</span></div><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures;">ds.coordinates.y_axis[0] = 1</span></div><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures;">ds.coordinates.y_axis['x'] = 1</span></div></div></div><div class=""><br class=""></div><div class="">This is just assigning the z axis (2) to the horizontal axis and the y axis (1) to the vertical axis.</div><div class=""><br class=""></div><div class=""><div class=""><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgba(0, 0, 0, 0.85098);">plot1 = yt.ProjectionPlot(ds,"x","velocity_x",weight_field='density')</div></div><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgba(0, 0, 0, 0.85098);"><span class="" style="font-variant-ligatures: no-common-ligatures;"><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures;">#plot1.plots["velocity_x"].axes.invert_xaxis()</span></div><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures;">plot1.save()</span></div><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures;"><br class=""></span></div><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures;"><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures;">plot12 = yt.ProjectionPlot(ds,"x","density")</span></div><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures;">#plot12.plots["density"].axes.invert_xaxis()</span></div><div class="" style="margin: 0px; line-height: normal;"><span class="" style="font-variant-ligatures: no-common-ligatures;">plot12.save()</span></div></span></div></span></div></div><div class=""><br class=""></div><div class="">And then I just use ProjectionPlot to make the plots. As you can see, I commented out a sort of matplotlib-y attempt to invert the horizontal axis, to no effect.</div><div class=""><br class=""></div><div class="">I’ve attached two files: the first is what I’m getting with the above code (‘Projection_x_density_actual'), and the second illustrates the orientation I’d like (‘Projection_x_density_rotated'). Unfortunately, I got to the desired orientation by swapping my vertical/horizontal axes like this:</div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgba(0, 0, 0, 0.85098);"><span class="" style="font-variant-ligatures: no-common-ligatures;">ds.coordinates.x_axis[0] = 1</span></div><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgba(0, 0, 0, 0.85098);"><span class="" style="font-variant-ligatures: no-common-ligatures;">ds.coordinates.x_axis['x'] = 1</span></div><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgba(0, 0, 0, 0.85098);"><span class="" style="font-variant-ligatures: no-common-ligatures;">ds.coordinates.y_axis[0] = 2</span></div><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgba(0, 0, 0, 0.85098);"><span class="" style="font-variant-ligatures: no-common-ligatures;">ds.coordinates.y_axis['x'] = 2</span></div></div><div class=""><br class=""></div><div class="">and then just rotating the png in preview.</div><div class=""><br class=""></div><div class="">I can’t find anything in the documentation about this besides the fact that we can use matplotlib objects to customize plots. I’d really appreciate any help on this!</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Greta</div><div class=""><br class=""></div><div class=""><img apple-inline="yes" id="3B027222-6D5B-4EE3-BB3B-D842CFA62422" class="" src="cid:1F2A26DF-C726-41F5-A0C9-972B3AB9B4C8"><img apple-inline="yes" id="B495CCF5-3A2D-491B-A280-A7AB825EACFC" class="" src="cid:1391AF0B-A8D2-4B5B-A36B-DB3F063E54B5"></div></body></html>