with plt.style.context(pubStyle): fig, axs = plt.subplots(1,2,figsize=(20,7)) ax = axs[0] ax.scatter(HUGScolor, HUGSmag,s=1,c=HUGSdensity, cmap="Reds") ax.scatter(ACScolor, ACSmag, s=1,c=ACSdensity, cmap='Blues', alpha=0.1) ax.set_xlim(0,2) ax.set_ylim(17, 22) ax.invert_yaxis() ACSSmoothTCK = splrep(ACSFiducial[0].mean[1], ACSFiducial[0].mean[0], s=0.001) ax.plot(BSpline(*ACSSmoothTCK)(ACSFiducial[0].mean[1]), ACSFiducial[0].mean[1] , color='g') HUGSmoothTCK = splrep(HUGSFiducial[0].mean[1], HUGSFiducial[0].mean[0], s=0.001) ax.plot(BSpline(*HUGSmoothTCK)(HUGSFiducial[0].mean[1]), HUGSFiducial[0].mean[1] , color='orange') ax.set_xlim(0.6, 1) ax.set_xlabel("F606W - F814W", fontsize=27) ax.set_ylabel("F606W", fontsize=27) legend_elements = [ Line2D([0], [0], marker='o', color='w', label='HUGS', markerfacecolor='r', markersize=10), Line2D([0], [0], marker='o', color='w', label='ACS', markerfacecolor='b', markersize=10), ] ax.legend(handles = legend_elements, frameon=False, fontsize=27) ax = axs[1] ax.set_xlabel("F606W", fontsize=27) ax.set_ylabel("HUGS$_{color}$ - ACS$_{color}$", fontsize=27) domain = np.linspace(19.5, 22, 1000) dist = measusre_perpendicular_distance(BSpline(*HUGSmoothTCK), BSpline(*ACSSmoothTCK), domain) ax.plot(domain, dist, color='black') ax.axhline(np.mean(dist), color='black', linestyle='dashed') # ax.axhline(np.median(dist)) fig.savefig("Figures/photometricOffset.pdf")