I made a scatter plot in Python that looks like this:
However, I want galactic longitude, l, to be plotted from 180 to -180 like these graphs from Iorio and Belokurov (2019):
Here is the code for my plot:
sns.set_style("ticks")
sns.set_context("poster")
%matplotlib inline
from matplotlib import pyplot as plt
fig = plt.figure(figsize=(8,5))
ax = fig.add_subplot(1,1,1, aspect='equal')
ax.scatter(rrl_pm.l, rrl_pm.b, s=1, color='black', alpha=0.1)
ax.set_xlim(0, 360)
ax.set_ylim(-90., 90.)
ax.set_xlabel("l [deg]")
ax.set_ylabel("b [deg]")
textstr = 'N = ' + str(len(rrl_pm.l))
props = dict(boxstyle='round', facecolor='white', alpha=0.5)
ax.text(0.05, 0.95, textstr, transform=ax.transAxes, fontsize=16,
verticalalignment='top', bbox=props)
plt.title("Scatter Plot of Cleaned Sample of RRLs in Sgr dSph with Spatial AND PM Cuts", fontsize = 16)
plt.savefig("SP-Clean-Spatial-PM.png", dpi = 1000)
plt.show()
If I simply change the xlim to run from 180 to -180 degrees the following graph is produced:
So essentially it only covers half the sky. Why exactly is this the case and what transformations do I need to apply to the galactic longitude for the 2nd plot to "wrap around" and display both sides?