with plt.style.context(pubStyle): fig, axs = plt.subplots(2,3, figsize=(15, 10)) ax1 = axs[0,0] ax2 = axs[1,0] ax3 = axs[0,1] ax4 = axs[1,1] ax5 = axs[0,2] ax6 = axs[1,2] f1 = "F275W" f2 = "F814W" f3 = f2 color = HUGSPhotometry[f1]-HUGSPhotometry[f2] mag = HUGSPhotometry[f3] density = HUGSPhotometry["density"] condF = (color > 1.75) & (color < 5) & (mag < 22) & (mag > 15) colorF = color[condF] magF = mag[condF] densityF = density[condF] ax1.scatter(colorF, magF, s=1, c=colorscheme.DartmouthGreen) ax1.invert_yaxis() ax2.scatter(colorF, magF, s=1, c=densityF, cmap=DGcmap) ax2.invert_yaxis() condZ = (color > 1.75) & (color < 3.5) & (mag < 20) & (mag > 18.1) colorZ = color[condZ] magZ = mag[condZ] densityZ = density[condZ] ax3.scatter(colorZ, magZ, s=1, c=colorscheme.DartmouthGreen) ax3.set_xticklabels([]) ax3.invert_yaxis() # normDensityZ = normalize_density(colorZ, magZ, densityZ) ax4.scatter(colorZ, magZ, s=1, c=densityZ, alpha=1, cmap=DGcmap) ax4.invert_yaxis() # IDs = ["A", "B", "C", "D", "E", "F"] # Axs = [ax1, ax3, ax5, ax2, ax4, ax6] # for ax, l in zip(Axs, IDs): # ax.text(0.9, 0.5, l, transform=ax.transAxes) plt.subplots_adjust(hspace=0) ax1.set_ylabel(f"{f3}", fontsize=23) ax2.set_ylabel(f"{f3}", fontsize=23) # ax3.set_ylabel(f"{f3}", fontsize=23) # ax4.set_ylabel(f"{f3}", fontsize=23) ax2.set_xlabel(f"{f1}-{f2}") ax4.set_xlabel(f"{f1}-{f2}") ax6.set_xlabel(f"{f1}-{f2}") condRGB = (color > 3) & (color < 5) & (mag < 17.5) & (mag > 15) colorRGB = color[condRGB] magRGB = mag[condRGB] densityRGB = density[condRGB] # normDensity = normalize_density(colorRGB, magRGB, densityRGB, n=10) ax5.scatter(colorRGB, magRGB,s=1, c=colorscheme.DartmouthGreen) ax5.invert_yaxis() ax6.scatter(colorRGB, magRGB,s=1, c=densityRGB, cmap=DGcmap) ax6.invert_yaxis() fig.savefig("Figures/DensityMap.png", dpi=300)