I'm trying to make a plot of the earth in geocentric solar ecliptic coordinates. This is a coordinate system centered at the earth's center and where +x points towards the sun, +z is parallel to the north ecliptic pole (aka, normal to the plane in which the earth orbits the sun), and +y is towards dusk.
To do this, I'm calculating the subsolar point and using that to find the point on the earth's surface (in latitude/longitude) that lines up with the Z axis. Then I'm making an orthographic projection of the Earth using cartopy, centered at the calculated latitude and longitude.
This is the graph I'm creating
I'm centering the map at the correct location. However, the problem is that I can't figure out how to rotate the map in two dimensions left and right. The only keywords the projection takes are central_longitude, central_latitude, and globe. There's nothing to tell it which way to rotate. It seems like cartopy only allows maps to be made so north is facing up, but I need to rotate the map sideways so the sun is facing the right side instead of the bottom.
Here's the code to generate that plot:
fig = plt.figure(figsize=(18,9))
t = dt.datetime(2014,12,30,0,0,0)
subsolar_lat, subsolar_long = sun_pos(t)
# Center at north ecliptic pole (GSE)
proj_long = subsolar_long
proj_lat = 90-abs(subsolar_lat)
proj=ccrs.Orthographic(proj_long, proj_lat)
left, bottom, width, height = [0.25, 0.25, 0.5, 0.5]
ax = fig.add_axes([left, bottom, width, height], projection = proj)
# Make the map look good
ax.gridlines()
ax.set_global()
ax.set_title(f"{t}")
ax.coastlines()
ax.add_feature(cf.OCEAN, alpha=0.2)
ax.add_feature(cf.LAND, alpha=0.5)
fill_dark_side(ax, time=t, color='black', alpha=0.5)
I found this question on StackOverflow which seems to be exactly what I'm trying to do. However, no one answered it, and their edit doesn't really solve my question either.
I've also tried a few different ways to rotate the axis, but none of them seem to work with Cartopy.
Is there a way to apply a transformation to this projection or to rotate an axis that uses Cartopy?